Re: Returning large select results from stored procedures

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Returning large select results from stored procedures
Дата
Msg-id 20040115075034.Q36122@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Returning large select results from stored procedures  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-general
On Thu, 15 Jan 2004, Bill Moran wrote:

> I'm having a little trouble understanding how to do something.  I assume
> I'm just missing it in the documentation, so a pointer to relevent docs
> would be as welcome as a direct answer.
>
> I have a project in which I'll need to create a number of stored
> procedures that are basically wrappers around complex SQL statements.
> Along the lines of:
>
> CREATE OR REPLACE FUNCTION expired(anyelement)
> RETURNS SETOF anyelement AS '

You probably don't want SETOF anyelement here. I would read that as a set
of any one thing at best.  You probably want to be defining a composite
type with create type and return SETOF thattype or returning SETOF record
and defining the type on the select that uses the function.

You can find more information at
http://techdocs.postgresql.org/guides/SetReturningFunctions
or in General Bits (the url to which I cannot remember off hand).


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fixed-length row
Следующее
От: Victor Spång Arthursson
Дата:
Сообщение: Foreign key question