From: | Marko Tiikkaja <marko(at)joh(dot)to> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL, RAISE and error context |
Date: | 2013-08-21 13:00:00 |
Message-ID: | 5214B9D0.9000409@joh.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-08-21 14:13:15 | Re: CAST Within EXCLUSION constraint |
Previous Message | Pavel Stehule | 2013-08-21 12:43:29 | Re: PL/pgSQL, RAISE and error context |