imploding/using arrays for IN (...) - Mailing list pgsql-general

From Cool Screen
Subject imploding/using arrays for IN (...)
Date
Msg-id 20021017191155.86278.qmail@web40609.mail.yahoo.com
Whole thread Raw
Responses Re: imploding/using arrays for IN (...)
List pgsql-general
Passing an array to a PL/pgSQL function, is it
possible to implode it and use with IN (...) ? For
example:

my_func(int[])
 ids := implode_func($1);

 select *
 from x
 where id in (ids);


I tried concatenating ids together with ',', but the
query gives an integer/text cast error. Or, is it
possible use arrays in IN()?

 select *
 from x
 where id in ({1,2,3});


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_attribute always grow...
Next
From: "Mark Wilson"
Date:
Subject: Re: imploding/using arrays for IN (...)