diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-25 16:54:52 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-25 16:54:52 -0400 |
commit | cd37bb78599dcf24cd22a124ce9174b5e2a76880 (patch) | |
tree | f04472f34be85e8a2c7f458c708d8eaaacfcb8dd /src/tools/msvc/Solution.pm | |
parent | fb8d2a7f57d87102f0a95025fbf1cad9c341739b (diff) |
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.
Diffstat (limited to 'src/tools/msvc/Solution.pm')
-rw-r--r-- | src/tools/msvc/Solution.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 60bcd7e7e63..ac1ba0a9f74 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -350,6 +350,17 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY ); } + if ($self->{options}->{tcl} + && IsNewer( + 'src/pl/tcl/pltclerrcodes.h', + 'src/backend/utils/errcodes.txt')) + { + print "Generating pltclerrcodes.h...\n"; + system( +'perl src/pl/tcl/generate-pltclerrcodes.pl src/backend/utils/errcodes.txt > src/pl/tcl/pltclerrcodes.h' + ); + } + if (IsNewer( 'src/backend/utils/sort/qsort_tuple.c', 'src/backend/utils/sort/gen_qsort_tuple.pl')) |