postgresql/src/backend
Tom Lane cacd42d62c Rewrite libxml error handling to be more robust.
libxml reports some errors (like invalid xmlns attributes) via the error
handler hook, but still returns a success indicator to the library caller.
This causes us to miss some errors that are important to report.  Since the
"generic" error handler hook doesn't know whether the message it's getting
is for an error, warning, or notice, stop using that and instead start
using the "structured" error handler hook, which gets enough information
to be useful.

While at it, arrange to save and restore the error handler hook setting in
each libxml-using function, rather than assuming we can set and forget the
hook.  This should improve the odds of working nicely with third-party
libraries that also use libxml.

In passing, volatile-ize some local variables that get modified within
PG_TRY blocks.  I noticed this while testing with an older gcc version
than I'd previously tried to compile xml.c with.

Florian Pflug and Tom Lane, with extensive review/testing by Noah Misch
2011-07-20 13:03:49 -04:00
..
access Remove O(N^2) performance issue with multiple SAVEPOINTs. 2011-07-19 17:21:24 +01:00
bootstrap Avoid index rebuild for no-rewrite ALTER TABLE .. ALTER TYPE. 2011-07-18 11:04:43 -04:00
catalog Avoid index rebuild for no-rewrite ALTER TABLE .. ALTER TYPE. 2011-07-18 11:04:43 -04:00
commands Remove superfluous variable. 2011-07-19 10:30:26 -04:00
executor Move Trigger and TriggerDesc structs out of rel.h into a new reltrigger.h 2011-07-04 14:35:58 -04:00
foreign Clean up most -Wunused-but-set-variable warnings from gcc 4.6 2011-04-11 22:28:45 +03:00
lib Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq Replace errdetail("%s", ...) with errdetail_internal("%s", ...). 2011-07-16 14:22:18 -04:00
main Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
nodes Avoid index rebuild for no-rewrite ALTER TABLE .. ALTER TYPE. 2011-07-18 11:04:43 -04:00
optimizer Improve make_subplanTargetList to avoid including Vars unnecessarily. 2011-07-16 16:46:55 -04:00
parser Try to acquire relation locks in RangeVarGetRelid. 2011-07-08 22:19:30 -04:00
po Fixed string in German translation that causes segfault. 2011-06-20 13:53:15 +02:00
port Introduce a pipe between postmaster and each backend, which can be used to 2011-07-08 18:44:07 +03:00
postmaster Cascading replication feature for streaming log-based replication. 2011-07-19 03:40:03 +01:00
regex Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
replication Cascading replication feature for streaming log-based replication. 2011-07-19 03:40:03 +01:00
rewrite Try to acquire relation locks in RangeVarGetRelid. 2011-07-08 22:19:30 -04:00
snowball Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
storage Some refinement for the "fast path" lock patch. 2011-07-19 12:10:15 -04:00
tcop Avoid index rebuild for no-rewrite ALTER TABLE .. ALTER TYPE. 2011-07-18 11:04:43 -04:00
tsearch Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
utils Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Fix symlink for errcodes.h so it works in VPATH builds from tarballs. 2011-06-22 13:08:08 -04:00
common.mk Workaround for recursive make breakage 2011-01-13 09:32:06 +02:00
nls.mk Add the possibility to pass --flag arguments to xgettext calls 2011-06-27 00:37:21 +03:00