pgsql: Modify the handling of RAISE without parameters so that the error

Started by Tom Laneover 16 years ago1 messagescommitters
Jump to latest
#1Tom Lane
tgl@postgresql.org

Log Message:
-----------
Modify the handling of RAISE without parameters so that the error it throws
can be caught in the same places that could catch an ordinary RAISE ERROR
in the same location. The previous coding insisted on throwing the error
from the block containing the active exception handler; which is arguably
more surprising, and definitely unlike Oracle's behavior.

Not back-patching, since this is a pretty obscure corner case. The risk
of breaking somebody's code in a minor version update seems to outweigh
any possible benefit.

Piyush Newe, reviewed by David Fetter

Modified Files:
--------------
pgsql/doc/src/sgml:
plpgsql.sgml (r1.156 -> r1.157)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/plpgsql.sgml?r1=1.156&r2=1.157)
pgsql/src/pl/plpgsql/src:
pl_exec.c (r1.261 -> r1.262)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.261&r2=1.262)
plpgsql.h (r1.130 -> r1.131)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h?r1=1.130&r2=1.131)
pgsql/src/test/regress/expected:
plpgsql.out (r1.86 -> r1.87)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/plpgsql.out?r1=1.86&r2=1.87)
pgsql/src/test/regress/sql:
plpgsql.sql (r1.72 -> r1.73)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/plpgsql.sql?r1=1.72&r2=1.73)