2007/8/21, Josh Trutwin <[EMAIL PROTECTED]>:
> On Tue, 21 Aug 2007 20:15:59 +0200
> "Pavel Stehule" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to