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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve PL/Tcl errorCode facility by providing decoded name for
Date: 2016-03-25 20:54:57
Message-ID: E1ajYkz-0001p2-UD@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-03-25 21:13:08 pgsql: Fix PL/Tcl for vpath builds.
Previous Message Tom Lane 2016-03-25 19:53:02 pgsql: In PL/Tcl, make database errors return additional info in the er