Back-patch today's memory management fixups in contrib/xml2.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8748dc35800d7a4f46cf469ede12583b5fb52a9e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-03-01T03:41:04Z
Releases: 8.4.3
Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.

Files

PathChange+/−
contrib/xml2/expected/xml2.out added +147 −0
contrib/xml2/Makefile modified +2 −1
contrib/xml2/sql/xml2.sql added +82 −0
contrib/xml2/xpath.c modified +141 −211
contrib/xml2/xslt_proc.c modified +10 −10