| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | Assad Jarrahian <jarraa(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: calling stored procedure with array paramenter (for psql) |
| Date: | 2006-01-10 03:40:47 |
| Message-ID: | 20060110034047.GA41296@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Mon, Jan 09, 2006 at 08:17:17PM -0700, Assad Jarrahian wrote:
> CREATE OR REPLACE FUNCTION getlms(_int4)
> RETURNS SETOF tp_locationmessage_object AS
> $BODY$
> DECLARE
> .......
>
>
> SELECT * FROM getLMs(<what_goes_here>);
>
> <what_goes_here> ... so lets say I want to send an array contain 1,23,34 ...
>
> how do I do that .. whats the syntax?
Either of the following should work:
SELECT * FROM getlms(ARRAY[1,23,34]);
SELECT * FROM getlms('{1,23,34}');
The first looks like what you said you tried already, so if it still
doesn't work then please post a complete example. The problem might
be in the function body, not in how you're calling the function,
so we need to see what the function is doing.
--
Michael Fuhr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matthew Peter | 2006-01-10 03:42:01 | Re: plpgsql question |
| Previous Message | Michael Fuhr | 2006-01-10 03:28:55 | Re: Passing a list of values to a function |