pgsql: Fix namespace handling in xpath function

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix namespace handling in xpath function
Date: 2015-01-07 04:14:06
Message-ID: E1Y8i0U-0007sh-Md@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix namespace handling in xpath function

Previously, the xml value resulting from an xpath query would not have
namespace declarations if the namespace declarations were attached to
an ancestor element in the input xml value. That means the output value
was not correct XML. Fix that by running the result value through
xmlCopyNode(), which produces the correct namespace declarations.

Author: Ali Akbar <the(dot)apaan(at)gmail(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/79af9a1d2668c9edc8171f03c39e7fed571eeb98

Modified Files
--------------
src/backend/utils/adt/xml.c | 34 ++++++++++++++++++++++++++--------
src/test/regress/expected/xml.out | 15 +++++++++++++++
src/test/regress/expected/xml_1.out | 12 ++++++++++++
src/test/regress/sql/xml.sql | 2 ++
4 files changed, 55 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-01-07 14:20:39 pgsql: Don't open a WAL segment for writing at end of recovery.
Previous Message Andres Freund 2015-01-06 23:44:08 pgsql: Improve relcache invalidation handling of currently invisible re