pgsql: Fix namespace handling in xpath function

Started by Peter Eisentrautover 11 years ago2 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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>

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6bbf75192801c0965cec28c8d93c4ed5f2e68b20

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

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

#2martipamies
martipamies@gmail.com
In reply to: Peter Eisentraut (#1)
Re: pgsql: Fix namespace handling in xpath function

Hi Ali,

I have seen that you are the one who fix that Xpath Issue. Great work and
congratulations.

Although, I've the following issue: I have a requirement to run my
applications on a 9.4.1 PostgreSQL server, and it uses Xpaht. Though I was
aware of namesapces bug, I have some workaround, but now, new right
behaviour enter in conflict with it.

Is there any way to run PostgreSQL 9.4.1 with previous Xpaht namespace
behaviour?

Greetings,
Martí

--
View this message in context: http://postgresql.nabble.com/pgsql-Fix-namespace-handling-in-xpath-function-tp5834439p5862763.html
Sent from the PostgreSQL - committers mailing list archive at Nabble.com.

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