pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: xml2: Replace deprecated routines with recommended ones
Date: Tue, 16 Apr 2024 03:27:29 +0000
Message-ID: <E1rwZTl-002Go2-3D@gemulon.postgresql.org> (raw)

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7c93f31dee5ff740b1367db472e69cdd290d8de2

Modified Files
--------------
contrib/xml2/xpath.c     | 11 ++++++-----
contrib/xml2/xslt_proc.c | 10 ++++++----
2 files changed, 12 insertions(+), 9 deletions(-)



view thread (8+ messages)

Message-ID: <E1rwZTl-002Go2-3D@gemulon.postgresql.org>
Permalink:  ../E1rwZTl-002Go2-3D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rwZTl-002Go2-3D@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: xml2: Replace deprecated routines with recommended ones
  In-Reply-To: <E1rwZTl-002Go2-3D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox