Re: imploding/using arrays for IN (...)

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: imploding/using arrays for IN (...)
Дата
Msg-id 20021017184259.Q17274-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на imploding/using arrays for IN (...)  (Cool Screen <cool_screen_name90001@yahoo.com>)
Список pgsql-general
On Thu, 17 Oct 2002, Cool Screen wrote:

> 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()?

Not really, but you may want to look at contrib/array
for some functions/operators that do item in array
lookups.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Roberto (SmartBit)"
Дата:
Сообщение: Finding a value in an array field
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query performance with small data base