]> git.ipfire.org Git - thirdparty/postgresql.git/commit
xml2: Replace deprecated routines with recommended ones
authorMichael Paquier <michael@paquier.xyz>
Tue, 16 Apr 2024 03:26:17 +0000 (12:26 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 16 Apr 2024 03:26:17 +0000 (12:26 +0900)
commitbb418aeee27078e2f3955a131515c151173143bd
tree630b9b7f95e9b9808b59a0c6fa2af26d825f61d7
parentb6e21cef72f1f93b0ec4d6da4d9c2e8bb3fca98a
xml2: Replace deprecated routines with recommended ones

Some functions are used in the tree and are currently marked as
deprecated by upstream.  This commit refreshes the code to use the
recommended functions, leading to the following changes:
- xmlSubstituteEntitiesDefault() is gone, and needs to be replaced with
XML_PARSE_NOENT for the paths doing the parsing.
- xmlParseMemory() -> xmlReadMemory().

These functions, as well as more functions setting global states, have
been officially marked as deprecated by upstream in August 2022.  Their
replacements exist since the 2001-ish area, as far as I have checked,
so that should be safe.

This has been originally applied as 65c5864d7fac without a backpatch,
and this has come up as well when working on 400928b83.  Per request
from Tom Lane, for new buildfarm member indri that is able to see
deprecation warnings with xmlSubstituteEntitiesDefault() in 16 and older
stable branches.

Author: Dmitry Koval
Discussion: https://postgr.es/m/18274-98d16bc03520665f@postgresql.org
Discussion: https://postgr.es/m/1012981.1713222862@sss.pgh.pa.us
Bakpatch-through: 12
contrib/xml2/xpath.c
contrib/xml2/xslt_proc.c