Re: PL/pgSQL, RAISE and error context

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: PL/pgSQL, RAISE and error context
Дата
Msg-id 5214B9D0.9000409@joh.to
обсуждение исходный текст
Ответ на PL/pgSQL, RAISE and error context  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-hackers
On 8/21/13 2:28 PM, I wrote:
> By default, PL/pgSQL does not print the error context of a RAISE
> statement, for example:

An even worse example:

=# create function foof() returns void as $$ begin raise exception 
'foo'; end $$ language plpgsql;
CREATE FUNCTION

=# create function barf() returns void as $$ declare _ record; begin for 
_ in execute 'select foof()' loop end loop; end $$ language plpgsql;
CREATE FUNCTION

=# select barf();
ERROR:  foo
CONTEXT:  PL/pgSQL function "barf" line 1 at FOR over EXECUTE statement

Notice how there's no mention at all about the function the error came 
from, and compare that to:

=# select barf();
ERROR:  foo
CONTEXT:  PL/pgSQL function "foof" line 1 RAISE
PL/pgSQL function "barf" line 1 at FOR over EXECUTE statement



Regards,
Marko Tiikkaja



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL, RAISE and error context
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CAST Within EXCLUSION constraint