Hi, The following works :
db=# select 1 = ANY ('{1,2,3}'::int[]); ?column? ---------- t (1 row) This doesn't : db=# select 1 = ANY (select '{1,2,3}'::int[]); ERROR: operator does not exist: integer = integer[] HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. Using an extra case, the above can easily be made to work : db=# select 1 = ANY ((select '{1,2,3}'::int[])::int[]); ?column? ---------- t (1 row) I'm just wondering why the array returned by the inner select is not casted by ANY() automagically? db=# select version(); version --------------------------------------------------------------------- PostgreSQL 7.4.5 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66 (1 row) -- Best, Frank. ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org