Select rows when all all ids of its children records matches - Mailing list pgsql-general

From Arup Rakshit
Subject Select rows when all all ids of its children records matches
Date
Msg-id FF55BC81-BB56-45C3-BCA2-B7D0F8E81F4A@zeit.io
Whole thread Raw
Responses Re: Select rows when all all ids of its children records matches  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
I have a table posts(id, name), posts_tags(post_id, tag_id) and tags (id, name) ... I want to get all posts which has tag id 1, 2 and 3 for example. How should I do this? I tried ALL, but it didn’t work.

Those tag ids comes from UI by users, so I am looking for generic approach.


Thanks,

Arup Rakshit



pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: PG9.1 migration to PG9.6, dump/restore issues
Next
From: Ron
Date:
Subject: Re: Select rows when all all ids of its children records matches