postgresql/src
Neil Conway d46bc444ac Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM.
These contain the SQLSTATE and error message of the current exception,
respectively. They are scope-local variables that are only defined
in exception handlers (so attempting to reference them outside an
exception handler is an error). Update the regression tests and the
documentation.

Also, do some minor related cleanup: export an unpack_sql_state()
function from the backend and use it to unpack a SQLSTATE into a
string, and add a free_var() function to pl_exec.c

Original patch from Pavel Stehule, review by Neil Conway.
2005-06-10 16:23:11 +00:00
..
backend Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM. 2005-06-10 16:23:11 +00:00
bin Use saveHistory so we get a nice error message on failure. 2005-06-10 15:40:41 +00:00
include Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM. 2005-06-10 16:23:11 +00:00
interfaces Remove unneeded variable test, per Tom. 2005-06-10 04:01:36 +00:00
makefiles Add a --dbname option to the pg_regress script, and use pl_regression 2005-05-17 18:26:23 +00:00
pl Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM. 2005-06-10 16:23:11 +00:00
port Add parentheses to macros when args are used in computations. Without 2005-05-25 21:40:43 +00:00
template
test Implement two new special variables in PL/PgSQL: SQLSTATE and SQLERRM. 2005-06-10 16:23:11 +00:00
timezone Modify hash_search() API to prevent future occurrences of the error 2005-05-29 04:23:07 +00:00
tools Back out make_mkid change. 2005-06-04 18:20:43 +00:00
tutorial
utils
bcc32.mak Add -N make flag to bcc builds from /src dir. 2005-05-13 18:12:35 +00:00
DEVELOPERS
Makefile
Makefile.global.in Add a --dbname option to the pg_regress script, and use pl_regression 2005-05-17 18:26:23 +00:00
Makefile.shlib
nls-global.mk
win32.mak