Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group