Re: Calling a plpgsql function with an array of results? - Mailing list pgsql-admin

From Naoko Reeves
Subject Re: Calling a plpgsql function with an array of results?
Date
Msg-id CAGoos17eyq-yyGBHo=d__0fLXoFpUdQkqE70SOcdtb2azhs7VA@mail.gmail.com
Whole thread Raw
In response to Calling a plpgsql function with an array of results?  (Wells Oliver <wellsoliver@gmail.com>)
List pgsql-admin
How about
select myschema.myfunction(SELECT ARRAY(select myid from mytable));
?

On Mon, Apr 23, 2012 at 5:29 PM, Wells Oliver <wellsoliver@gmail.com> wrote:
Trying to call my function like so:

select myschema.myfunction(select myid from mytable);

myfunction has the signature: myfunction(integer[])

myid is an integer; I am trying to select them as an array to pass to the function.

Where am I going wrong? Thanks!

--
Wells Oliver
wellsoliver@gmail.com



--
Naoko Reeves

pgsql-admin by date:

Previous
From: Wells Oliver
Date:
Subject: Calling a plpgsql function with an array of results?
Next
From: Lukasz Brodziak
Date:
Subject: Re: pg_dump: schema with OID 145167 does not exist