Re: Problems with Set Returning Functions (SRFs)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Otto Blomqvist" <o(dot)blomqvist(at)secomintl(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Problems with Set Returning Functions (SRFs)
Date: 2005-04-06 20:30:44
Message-ID: 5852.1112819444@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

"Otto Blomqvist" <o(dot)blomqvist(at)secomintl(dot)com> writes:
> secom=# select f1, f2, f3 from testpassbyval(1, (Select number1 from test));
> ERROR: more than one row returned by a subquery used as an expression

In 8.0 I think it'd work to do

select (x).f1, (x).f2, (x).f3 from
(select testpassbyval(1, number1) as x from test) ss;

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-04-06 20:37:59 Re: Big trouble with memory !!
Previous Message Mage 2005-04-06 19:44:43 Re: lower function

Browse pgsql-sql by date

  From Date Subject
Next Message Otto Blomqvist 2005-04-06 22:31:45 Re: [GENERAL] Problems with Set Returning Functions (SRFs)
Previous Message Mischa 2005-04-06 20:03:27 Re: DROP TYPE without error?