agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedpgsql: Fix handling of namespace nodes in xpath() (xml)
6+ messages / 1 participants
[nested] [flat]
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1740766012e6432be639e0da98c5f4a917bfeafd
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 5 +++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1d8c72b2eff61202f3b35c0c130a52231cb3590a
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 5 +++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/41876c8d77834021d9b1f2b4f62c27c886f47c3b
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 6 ++++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 16 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8bf257aebac12791dc78a599e4f7dc225893d45e
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 5 +++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4c777d6dd9c9ac8fc8316329745ed1177989379d
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 5 +++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of namespace nodes in xpath() (xml)
@ 2026-06-12 01:26 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2026-06-12 01:26 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of namespace nodes in xpath() (xml)
xpath() attempted to call xmlCopyNode() and xmlNodeDump() on a
XML_NAMESPACE_DECL, finishing with a confusing error:
=# SELECT xpath('//namespace::foo', '<root xmlns:foo="http://127.0.0.1"/>';);
ERROR: 53200: could not copy node
CONTEXT: SQL function "xpath" statement 1
xpath() is changed so as it goes through xmlXPathCastNodeToString()
instead, that is able to handle namespace nodes. xml2 uses the same
solution. This issue has been discovered while digging into
9d33a5a804db.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aioT7ui_ZJ9RMlfM@paquier.xyz
Backpatch-through: 14
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6c08cbb7a7b45171f058641c553210cd3261fe6c
Modified Files
--------------
src/backend/utils/adt/xml.c | 4 +++-
src/test/regress/expected/xml.out | 6 ++++++
src/test/regress/expected/xml_1.out | 5 +++++
src/test/regress/sql/xml.sql | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-06-12 01:26 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
2026-06-12 01:26 pgsql: Fix handling of namespace nodes in xpath() (xml) Michael Paquier <michael@paquier.xyz>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox