Re: How to pass array of values to a stored procedure

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to pass array of values to a stored procedure
Дата
Msg-id 5376.1153242928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to pass array of values to a stored procedure  (Curtis Scheer <Curtis@DAYCOS.com>)
Список pgsql-sql
Curtis Scheer <Curtis@DAYCOS.com> writes:
> Does anyone have any examples of how I would make a stored procedure in
> plpgsql that would allow for passing a list or arrays of values to be used
> in an sql IN clause?  Like so: select * from table where field1 in (values).

Probably the "field1 = ANY (arrayvalue)" syntax is what you want.  Note
however that this can't be turned into an indexscan on field1 in existing
releases (8.2 will be able to do it).
        regards, tom lane


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

Предыдущее
От: Bricklen Anderson
Дата:
Сообщение: Re: hi let me know the solution to this question
Следующее
От: "Tony Wasson"
Дата:
Сообщение: Re: How to pass array of values to a stored procedure