]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix XMLTABLE() deparsing to quote namespace names if necessary.
authorDean Rasheed <dean.a.rasheed@gmail.com>
Sun, 12 Jan 2025 12:59:40 +0000 (12:59 +0000)
committerDean Rasheed <dean.a.rasheed@gmail.com>
Sun, 12 Jan 2025 12:59:40 +0000 (12:59 +0000)
commit7c0379516f367cf6a3709c46b2fed12777468130
tree90f56f06a5f0b1c24ed6376e9c934029ed7218a8
parent71bb9c4b2a1425877e0ef2a983bb855c6ce7bffc
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
src/backend/utils/adt/ruleutils.c
src/test/regress/expected/xml.out
src/test/regress/expected/xml_1.out
src/test/regress/expected/xml_2.out
src/test/regress/sql/xml.sql