From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.
Date: Sun, 12 Jan 2025 13:05:51 +0000
Message-ID: <E1tWxf5-00195S-4i@gemulon.postgresql.org> (raw)
Fix XMLTABLE() deparsing to quote namespace names if necessary.
When deparsing an XMLTABLE() expression, XML namespace names were not
quoted. However, since they are parsed as ColLabel tokens, some names
require double quotes to ensure that they are properly interpreted.
Fix by using quote_identifier() in the deparsing code.
Back-patch to all supported versions.
Dean Rasheed, reviewed by Tom Lane.
Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/dc8cd9cd0198ff1d87815e74b101b4c03754f513
Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 3 ++-
src/test/regress/expected/xml.out | 10 +++++++---
src/test/regress/expected/xml_1.out | 8 +++++---
src/test/regress/expected/xml_2.out | 10 +++++++---
src/test/regress/sql/xml.sql | 8 +++++---
5 files changed, 26 insertions(+), 13 deletions(-)
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: dean.a.rasheed@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.
In-Reply-To: <E1tWxf5-00195S-4i@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