]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix incompatibility with libxml2 >= 2.14
authorMichael Paquier <michael@paquier.xyz>
Sun, 6 Jul 2025 23:54:30 +0000 (08:54 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 6 Jul 2025 23:54:30 +0000 (08:54 +0900)
commit8d1071e7da30dc46502c24a18cf61c285f6d6c1b
treea3d05425cf7a87450adb872cafa77d0c8f9157d4
parent1e007722fa86ff397b0f3d165c89237ab3b05967
Fix incompatibility with libxml2 >= 2.14

libxml2 has deprecated the members of xmlBuffer, and it is recommended
to access them with dedicated routines.  We have only one case in the
tree where this shows an impact: xml2/xpath.c where "content" was
getting directly accessed.  The rest of the code looked fine, checking
the PostgreSQL code with libxml2 close to the top of its "2.14" branch.

xmlBufferContent() exists since year 2000 based on a check of the
upstream libxml2 tree, so let's switch to it.

Like 400928b83bd2, backpatch all the way down as this can have an impact
on all the branches already released once newer versions of libxml2 get
more popular.

Reported-by: Walid Ibrahim <walidib@amazon.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aGdSdcR4QTjEHX6s@paquier.xyz
Backpatch-through: 13
contrib/xml2/xpath.c