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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to