How can I store user generated content in postgresql or rdbms?
I can't comment so I'll post here.
If I understood you correctly, you wish to know which posts each user created?
If so.. create another table &quot;user_posts&quot; which will have a foreign key with a user_id and then all your post data, Then if you want to find which posts are associated with each user you can use a JOIN.