]> granicus.if.org Git - postgresql/commit
Make contrib/xml2 use core xml.c's error handler, when available (that is,
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Mar 2010 19:10:29 +0000 (19:10 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Mar 2010 19:10:29 +0000 (19:10 +0000)
commit40c5457e60432696508a63135030936f61f54d1d
tree3f6d314f39dfae8a38cc1678f4b2e3141f26b2b2
parent3c93c3ab9535e88e47d1f357e5a77a0905dfcc01
Make contrib/xml2 use core xml.c's error handler, when available (that is,
in versions >= 8.3).  The core code is more robust and efficient than what
was there before, and this also reduces risks involved in swapping different
libxml error handler settings.

Before 8.3, there is still some risk of problems if add-on modules such as
Perl invoke libxml without setting their own error handler.  Given the lack
of reports I'm not sure there's a risk in practice, so I didn't take the
step of actually duplicating the core code into older contrib/xml2 branches.
Instead I just tweaked the existing code to ensure it didn't leave a dangling
pointer to short-lived memory when throwing an error.
contrib/xml2/xpath.c
contrib/xml2/xslt_proc.c