]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix namespace handling in xpath function
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 7 Jan 2015 04:06:13 +0000 (23:06 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Sun, 18 Jan 2015 03:37:07 +0000 (22:37 -0500)
commitc975fa4713c2325623d7bbfd81806327234281ac
tree9f37de4a6e62cc04bd98ebc725a323bdb1d59a1b
parent1c49561762933b6d0502bd852cf4acbcbfedd66b
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.apaan@gmail.com>
src/backend/utils/adt/xml.c
src/test/regress/expected/xml.out
src/test/regress/expected/xml_1.out
src/test/regress/sql/xml.sql