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-18 03:43:14
Message-ID: E1YCgle-0004o4-QS@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
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c975fa4713c2325623d7bbfd81806327234281ac

Modified Files
--------------
src/backend/utils/adt/xml.c | 17 ++++++++++++++++-
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, 45 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-01-18 15:20:05 pgsql: Fix use of already freed memory when dumping a database's securi
Previous Message Andres Freund 2015-01-17 16:58:54 Re: pgsql: Remove USE_VPATH make variable from PGXS