imploding/using arrays for IN (...)

Поиск
Список
Период
Сортировка
От Cool Screen
Тема imploding/using arrays for IN (...)
Дата
Msg-id 20021017190832.82210.qmail@web40612.mail.yahoo.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Jose Antonio Leo"
Дата:
Сообщение: A table underneath another one
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: [SQL] isAutoIncrement and Postgres