I'm wondering why a IN b isn't equivalent to a = ANY b for arrays, as it 
is for subqueries.

That is, why can't you write

SELECT 1 IN ( ARRAY[1, 2, 3] );

when you can write

SELECT 1 = ANY ( ARRAY[1, 2, 3] );


I'm guessing that there is a semantic inconsistency between these 
expressions, as the first one considers what is in parentheses as a 
list, the second one as a single expression.  That would be very bad.

Peter Eisentraut

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to