Re: Is This A Set Based Solution?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Is This A Set Based Solution?
Дата
Msg-id 20070318161941.GC5722@svana.org
обсуждение исходный текст
Ответ на Re: Is This A Set Based Solution?  (Stefan Berglund <sorry.no.koolaid@for.me>)
Список pgsql-general
On Thu, Mar 15, 2007 at 10:26:48AM -0700, Stefan Berglund wrote:
> that PostgreSQL would allow a substitutable parameter in the IN clause.
> However, it seems that it can't be done in this fashion without using
> dynamic SQL unless I'm missing something.

The substitutable list has to be an array, not a text value. So
if the parameter is specified as ARRAY OF INTEGER, you can call it
like:

SELECT foo(ARRAY[1,2,3,45]);
SELECT foo('{1,2,3,4,56}');

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Ted Byers"
Дата:
Сообщение: Re: Design / Implementation problem
Следующее
От: Bob Hartung
Дата:
Сообщение: phpPgAdmin - prior version available?