From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix minor deficiencies in XMLTABLE, xpath(), xmlexists()
Date: Thu, 07 Mar 2019 21:20:38 +0000
Message-ID: <E1h20RS-0001ms-WD@gemulon.postgresql.org> (raw)
Fix minor deficiencies in XMLTABLE, xpath(), xmlexists()
Correctly process nodes of more types than previously. In some cases,
nodes were being ignored (nothing was output); in other cases, trying to
return them resulted in errors about unrecognized nodes. In yet other
cases, necessary escaping (of XML special characters) was not being
done. Fix all those (as far as the authors could find) and add
regression tests cases verifying the new behavior.
I (Álvaro) was of two minds about backpatching these changes. They do
seem bugfixes that would benefit most users of the affected functions;
but on the other hand it would change established behavior in minor
releases, so it seems prudent not to.
Authors: Pavel Stehule, Markus Winand, Chapman Flack
Discussion:
https://postgr.es/m/CAFj8pRA6J25CtAZ2TuRvxK3gat7-bBUYh0rfE2yM7Hj9GD14Dg@mail.gmail.comhttps://postgr.es/m/8BDB0627-2105-4564-AA76-7849F028B96E@winand.at
The elephant in the room as pointed out by Chapman Flack, not fixed in
this commit, is that we still have XMLTABLE operating on XPath 1.0
instead of the standard-mandated XQuery (or even its subset XPath 2.0).
Fixing that is a major undertaking, however.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/251cf2e27bec98274e8bb002608680bdc211319e
Modified Files
--------------
doc/src/sgml/func.sgml | 6 +-
src/backend/utils/adt/xml.c | 155 ++++++++++++++++++++----------------
src/test/regress/expected/xml.out | 27 ++++++-
src/test/regress/expected/xml_1.out | 19 +++++
src/test/regress/expected/xml_2.out | 27 ++++++-
src/test/regress/sql/xml.sql | 8 ++
6 files changed, 164 insertions(+), 78 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Fix minor deficiencies in XMLTABLE, xpath(), xmlexists()
In-Reply-To: <E1h20RS-0001ms-WD@gemulon.postgresql.org>
References: <E1h20RS-0001ms-WD@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