Re: RETURN SET OF DATA WITH CURSOR - Mailing list pgsql-sql

From grupos
Subject Re: RETURN SET OF DATA WITH CURSOR
Date
Msg-id 43A1A09D.6020708@carvalhaes.net
Whole thread Raw
In response to Re: RETURN SET OF DATA WITH CURSOR  (Richard Huxton <dev@archonet.com>)
Responses Re: RETURN SET OF DATA WITH CURSOR  (Richard Huxton <dev@archonet.com>)
Re: RETURN SET OF DATA WITH CURSOR  (Patrick JACQUOT <patrick.jacquot@anpe.fr>)
List pgsql-sql
Hi Richard,

Thanks for your promptly answer. I don't have experience returning 
refcursor but my choice would be it.
I read the documentation but I didn't find any example with my necessity...

Could you give me a small example on the same "basis" that I want?

Thanks,

Rodrigo Carvalhaes

Richard Huxton wrote:
> grupos wrote:
>> Hi !
>>
>> I am making one plpgsql function and I need to return of setof data 
>> using a cursor.
>>
>> The problem is that my function is returning only the first row and 
>> column of the query. This query have more than 80 columns and 1.000 
>> rows. Enyone have any tip to give me?
> 
> Yes - decide whether you are returning a set of rows or a refcursor.
> 
> Check the plpgsql docs again for how to return SETOF <rowtype> using the 
> RETURN NEXT statement. Then you call your function like: SELECT * FROM 
> my_func();
> 


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: RETURN SET OF DATA WITH CURSOR
Next
From: Richard Huxton
Date:
Subject: Re: RETURN SET OF DATA WITH CURSOR