Re: Problems with Set Returning Functions (SRFs) - Mailing list pgsql-sql

From Sean Davis
Subject Re: Problems with Set Returning Functions (SRFs)
Date
Msg-id 5ad7366b9228273de19f4173aa30c2ba@mail.nih.gov
Whole thread Raw
In response to Problems with Set Returning Functions (SRFs)  ("Otto Blomqvist" <o.blomqvist@secomintl.com>)
List pgsql-sql
On Apr 6, 2005, at 2:53 PM, Otto Blomqvist wrote:
>
> 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
>
> This is where I fail. Am I even on the right path here ? Writing the
> actual
> parsing function will be easy once I have a working concept.
>

How about (untested):

select f1, f2, f3 from (
    select testpassbyval(1,(
        select number1 from test)
                        )
    ) a;

Sean


pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: Getting the output of a function used in a where clause
Next
From: "Dinesh Pandey"
Date:
Subject: How to Port Oracle's user defined "Package" into Postgres 8.0.1.