Re: When is a record NULL?

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: When is a record NULL?
Дата
Msg-id 5BE64390-BB4B-4FCC-B3CF-4853471429D3@kineticode.com
обсуждение исходный текст
Ответ на Re: When is a record NULL?  ("Eric B. Ridge" <ebr@tcdi.com>)
Ответы Re: When is a record NULL?  (David E. Wheeler <david@kineticode.com>)
Список pgsql-hackers
On Jul 26, 2009, at 4:02 PM, Eric B. Ridge wrote:

> I'm just a random lurker, but FOUND seems to work just fine (I  
> suppose it's PG-specific?).
>
> http://www.postgresql.org/docs/8.1/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS
>
> BEGIN
>   OPEN stuff;
>   FETCH stuff INTO rec;
>   WHILE FOUND LOOP
>      RETURN NEXT rec;
>      FETCH stuff INTO rec;
>   END LOOP;
> END;

Yep, that's just what I needed, thanks. I think I'll send a patch for  
the "Cursors" section of the PL/pgSQL documentation that mentions  
this. Would have saved me a bunch of hassle.

Best,

David



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: Deferrable unique constraints
Следующее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: SRPMs?