Re: PLPGSQL Returning Records

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: PLPGSQL Returning Records
Дата
Msg-id 20031118083723.D41108@megazone.bigpanda.com
обсуждение исходный текст
Ответ на PLPGSQL Returning Records  (Alex <alex@meerkatsoft.com>)
Список pgsql-general
On Tue, 18 Nov 2003, Alex wrote:

> Hi,
> I am trying to return a recod from from my function but for some reason
> it does not work.
>
> Here is may problem. I use a for loop to generate the first batch of
> records. Once the loop is completed I want to add another record. But at
> that point fails.
>
> ....
>
> FOR  rec IN SELECT ....
> LOOP
>
>   RETURN NEXT r;
> END LOOP;
>
> do some assignments
> RETURN r;

I think you want RETURN NEXT r; (or rec) to add the record to the
set of output rows.


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Newbie: port
Следующее
От: Bruce Momjian
Дата:
Сообщение: E-Week Magazine looking for users