2007/8/21, Josh Trutwin <josh@xxxxxxxxxxxxxxxxxxx>: > On Tue, 21 Aug 2007 20:15:59 +0200 > "Pavel Stehule" <pavel.stehule@xxxxxxxxx> wrote: > > > SELECT * FROM ... WHERE 1000 IN (SELECT pb_ids FROM pb WHERE id=123) > > > > or > > > > SELECT * FROM ... WHERE 1000 = ANY(ARRAY(SELECT pb_ids FROM pb > > WHERE id=123)) > > Thanks - another way: > > SELECT * FROM ... WHERE 1000 = ANY((SELECT pb_ids FROM pb > WHERE id=123)::integer[]) > it works? no. pavel=# select 1 from (values(10)) a(i) where i = any((select * from foo)::int[]); ERROR: cannot cast type integer to integer[] LINE 1: ...values(10)) a(i) where i = any((select * from foo)::int[]); ^ pavel=# ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly