Re: help with PL/PgSQL bug

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: help with PL/PgSQL bug
Дата
Msg-id 1042250788.743.95.camel@tokyo
обсуждение исходный текст
Ответ на Re: help with PL/PgSQL bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: help with PL/PgSQL bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2003-01-10 at 20:28, Tom Lane wrote:
> The core dump appears to occur when the SELECT INTO fails to retrieve
> a row, leaving "finalrec" undefined.

Thanks very much for your help, Tom.

> Clearly, RETURN NEXT with an undefined record variable shouldn't dump
> core, but what should it do? Raise an error, or perhaps be a no-op?

I'd vote for making it a no-op. Raising an error is too severe for a
fairly routine occurence, IMHO. If we make it a no-op, it's consistent
with how I understand a SELECT INTO of 0 rows -- it doesn't produce an
"undefined value", but an "empty result set" (like the difference
between "" and a NULL pointer).

Cheers,

Neil
-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC





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

Предыдущее
От: Laurette Cisneros
Дата:
Сообщение: Re: 7.3 pg_dump with -Fc option crashes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: help with PL/PgSQL bug