I have a table with a column containing an array (lets call it tags for now).
How can I SELECT from that table all rows where the array column DOES NOT contain a certain tag?
One way to do this would be getting all ids where that tag is contained, then you can exclude those with a subquery:
SELECT *
FROM foo
WHERE id NOT IN (
SELECT id
FROM foo
WHERE tags @> ['specific-tag-here', 'other-tag-here']);
WHERE not ( tags @> 'specific-tag-here')? Much simpler and faster