Re: JOIN results of refcursor functions - Mailing list pgsql-sql

From Milan Oparnica
Subject Re: JOIN results of refcursor functions
Date
Msg-id ggv6ir$ma5$1@news.hub.org
Whole thread Raw
In response to Re: JOIN results of refcursor functions  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: JOIN results of refcursor functions
List pgsql-sql
Alvaro Herrera wrote:
> Milan Oparnica escribió:
>> Tom Lane wrote:
>>> Milan Oparnica <milan.opa@gmail.com> writes:
>>>> Is there any way to use INNER, LEFT and RIGHT JOIN between functions  
>>>> returning refcursor type.
>>> No.  Make them return setof whatever instead.
>>>
>> I would like yo avoid creating custom composite types required for setof.
> 
> Then use OUT variables.
> 

I've searched documentation (8.3) and didn't find a way to use OUT 
variables in same manner as SETOF (RETURN NEXT doesn't create a record 
type result).

Can you please give an example of how to return select fld1, fld2 from 
table through OUT variables so the caller gets records ? If possible, 
use refcursor as a source ?


pgsql-sql by date:

Previous
From: "Helio Campos Mello de Andrade"
Date:
Subject: Re: Converting between UUID and VARCHAR
Next
From: Alvaro Herrera
Date:
Subject: Re: JOIN results of refcursor functions