I have a postgresql array a = [key1,key2,...] with primary keys and a table foo.
What's the best way to check if all the primary keys in a exist in the table foo?
To clarify: I am looking for a query that returns TRUE if and only if all the keys in the array a exist in the table foo.
Thanks!