Thread: pgsql: Improve PL/Tcl errorCode facility by providing decoded name for

pgsql: Improve PL/Tcl errorCode facility by providing decoded name for

From
Tom Lane
Date:
Improve PL/Tcl errorCode facility by providing decoded name for SQLSTATE.

We don't really want to encourage people to write numeric SQLSTATEs in
programs; that's unreadable and error-prone.  Copy plpgsql's infrastructure
for converting between SQLSTATEs and exception names shown in Appendix A,
and modify examples in tests and documentation to do it that way.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cd37bb78599dcf24cd22a124ce9174b5e2a76880

Modified Files
--------------
doc/src/sgml/pltcl.sgml              | 10 +++++----
src/backend/utils/errcodes.txt       |  3 +++
src/pl/tcl/.gitignore                |  2 ++
src/pl/tcl/Makefile                  | 15 ++++++++++++--
src/pl/tcl/expected/pltcl_setup.out  | 10 ++++-----
src/pl/tcl/generate-pltclerrcodes.pl | 40 ++++++++++++++++++++++++++++++++++++
src/pl/tcl/pltcl.c                   | 36 ++++++++++++++++++++++++++++++++
src/pl/tcl/sql/pltcl_setup.sql       |  4 ++--
src/tools/msvc/Solution.pm           | 11 ++++++++++
9 files changed, 118 insertions(+), 13 deletions(-)