hubert depesz lubaczewski <depesz@depesz.com> writes:
> Why this doesn't work:
> # SELECT 1 = ANY( ( SELECT '{1,2}'::int4[]) );
> ERROR: operator does not exist: integer = integer[]
> LINE 1: SELECT 1 = ANY( ( SELECT '{1,2}'::int4[]) );
> ^
Why would you expect it to work? The datatypes aren't compatible.
> direct usage of array of course works:
> # select 1 = any ( '{1,2}'::int4[] );
ANY with a sub-SELECT and ANY without one are two completely different
things.
regards, tom lane