From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Stefan Berglund <sorry(dot)no(dot)koolaid(at)for(dot)me> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is This A Set Based Solution? |
Date: | 2007-03-18 16:19:41 |
Message-ID: | 20070318161941.GC5722@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Bob Hartung | 2007-03-18 16:41:47 | phpPgAdmin - prior version available? |
Previous Message | Ted Byers | 2007-03-18 15:25:06 | Re: Design / Implementation problem |