postgresql/contrib/xml2
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
..
expected Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
Makefile Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
xml2--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
xml2--unpackaged--1.0.sql Fix upgrade of contrib/xml2 from 9.0. 2011-02-17 18:11:28 -05:00
xml2.control Fix upgrade of contrib/xml2 from 9.0. 2011-02-17 18:11:28 -05:00
xpath.c Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00
xslt_proc.c Rewrite libxml error handling to be more robust. 2011-07-20 13:03:49 -04:00