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 <[email protected]>

Branch
------
REL9_0_STABLE

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

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(-)


-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to