Skip to content

Instantly share code, notes, and snippets.

@alq666
Created August 20, 2013 15:09
Show Gist options
  • Save alq666/6282672 to your computer and use it in GitHub Desktop.
Save alq666/6282672 to your computer and use it in GitHub Desktop.
SELECT c.key,
c.x_key,
c.tags,
x.name
FROM context c
JOIN x
ON c.x_key = x.key
WHERE c.key = ANY (VALUES (15368196), -- 11,000 other keys --)
AND c.x_key = 1
AND c.tags @> ARRAY[E'blah'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment