Compare multiple field to single IN query
You haven't supplied a clear definition of the problem, so I have to guess you probably mean "if any of these field values are in this list" or "if all of these field values are in this list".

Either way, you'll want to use logical array operators. The "any" case is array-overlaps, &amp;&amp;:

ARRAY[owner1,owner2,owner3] &amp;&amp; (select array_agg(id) from login)


and the "all" case is array-contains, &lt;@:

ARRAY[owner1,owner2,owner3] &lt;@ (select array_agg(id) from login)