Add GET STACKED DIAGNOSTICS plpgsql command to retrieve exception info.
Tom Lane <tgl@sss.pgh.pa.us>
Add GET STACKED DIAGNOSTICS plpgsql command to retrieve exception info. This is more SQL-spec-compliant, more easily extensible, and better performing than the old method of inventing special variables. Pavel Stehule, reviewed by Shigeru Hanada and David Wheeler
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/plpgsql.sgml | modified | +106 −15 |
| src/backend/utils/errcodes.txt | modified | +31 −24 |
| src/pl/plpgsql/src/gram.y | modified | +87 −2 |
| src/pl/plpgsql/src/pl_exec.c | modified | +65 −6 |
| src/pl/plpgsql/src/pl_funcs.c | modified | +30 −17 |
| src/pl/plpgsql/src/plpgsql.h | modified | +9 −2 |
| src/pl/plpgsql/src/pl_scanner.c | modified | +7 −0 |
| src/test/regress/expected/plpgsql.out | modified | +75 −0 |
| src/test/regress/sql/plpgsql.sql | modified | +70 −0 |