Re: Calling a plpgsql function with an array of results?

From: Naoko Reeves <naokoreeves(at)gmail(dot)com>
To: Wells Oliver <wellsoliver(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Calling a plpgsql function with an array of results?
Date: 2012-04-24 04:09:28
Message-ID: CAGoos17eyq-yyGBHo=d__0fLXoFpUdQkqE70SOcdtb2azhs7VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)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(at)gmail(dot)com
>

--
Naoko Reeves
http://www.anypossibility.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lukasz Brodziak 2012-04-25 07:02:12 Re: pg_dump: schema with OID 145167 does not exist
Previous Message Wells Oliver 2012-04-24 00:29:47 Calling a plpgsql function with an array of results?