Re: RETURN SET OF DATA WITH CURSOR

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: RETURN SET OF DATA WITH CURSOR
Дата
Msg-id 43A193B4.5070206@archonet.com
обсуждение исходный текст
Ответ на RETURN SET OF DATA WITH CURSOR  (grupos <grupos@carvalhaes.net>)
Ответы Re: RETURN SET OF DATA WITH CURSOR  (grupos <grupos@carvalhaes.net>)
Список pgsql-sql
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();

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Gianluca Riccardi
Дата:
Сообщение: Re: selective updates
Следующее
От: grupos
Дата:
Сообщение: Re: RETURN SET OF DATA WITH CURSOR