Re: How to pass array of values to a stored procedure - Mailing list pgsql-sql

From Tom Lane
Subject Re: How to pass array of values to a stored procedure
Date
Msg-id 5376.1153242928@sss.pgh.pa.us
Whole thread Raw
In response to How to pass array of values to a stored procedure  (Curtis Scheer <Curtis@DAYCOS.com>)
List 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 by date:

Previous
From: Bricklen Anderson
Date:
Subject: Re: hi let me know the solution to this question
Next
From: "Tony Wasson"
Date:
Subject: Re: How to pass array of values to a stored procedure