postgresql/src
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
..
backend Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00
bin Add \ir command to psql. 2011-07-06 11:45:13 -04:00
include Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00
interfaces Adapted expected result for latest change to ecpglib. 2011-07-18 19:08:27 +02:00
makefiles Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
pl Add GET STACKED DIAGNOSTICS plpgsql command to retrieve exception info. 2011-07-18 14:47:18 -04:00
port Add \ir command to psql. 2011-07-06 11:45:13 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00
timezone Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
tools Blind attempt at fixing isolation_tester on Win32 2011-07-13 01:10:26 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:12 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Add the possibility to pass --flag arguments to xgettext calls 2011-06-27 00:37:21 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00