mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-15 09:33:23 +02:00
cacd42d62c
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 |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
Makefile | ||
xml2--1.0.sql | ||
xml2--unpackaged--1.0.sql | ||
xml2.control | ||
xpath.c | ||
xslt_proc.c |