Re: Is This A Set Based Solution? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Is This A Set Based Solution?
Date
Msg-id 20070318161941.GC5722@svana.org
Whole thread Raw
In response to Re: Is This A Set Based Solution?  (Stefan Berglund <sorry.no.koolaid@for.me>)
List 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.

Attachment

pgsql-general by date:

Previous
From: "Ted Byers"
Date:
Subject: Re: Design / Implementation problem
Next
From: Bob Hartung
Date:
Subject: phpPgAdmin - prior version available?