I have been wondering whether it's possible to do multidimensional tables in PostgreSQL. Here's an example table from my project:
id | created_by | content | comments |
---+---------------+----------------------------+----------+
1 | Anonymous | does this thing work? | |
2 | James | this is the body | |
3 | Chan | this must work this time~! | |
4 | Freak | just to add something new | |
5 | Anonymous | yahoo! | |
What do I mean by multidimensional table? It would look like something like this if there's such thing.
id | created_by | content | comments |
---+---------------+----------------------------+------------------------------------------+
1 | Anonymous | does this thing work? | id | created_by | comments |
2 | James | this is the body | |created_by| comments |
3 | Chan | this must work this time~! | |
4 | Freak | just to add something new | |
5 | Anonymous | yahoo! | |
This is just an example. But the key concept is that in every comment, there's another set of columns, making comments sort of like a table by itself.
So yeah, does this exist in Postgres or is there any better way to implement this feature? :)