From: Tom Lane <tgl@sss.pgh.pa.us>
To: onic@live.fr
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath
Date: Thu, 19 May 2016 13:56:18 -0400
Message-ID: <32376.1463680578@sss.pgh.pa.us> (raw)
In-Reply-To: <20160519150037.12503.16@wrigleys.postgresql.org>
References: <20160519150037.12503.16@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
onic@live.fr writes:
> SELECT unnest(xpath('/name/text()', xmlelement(name name, 'AT&T', null )))
> This gives me 'AT&T' and
AFAICS, that behavior is correct. xpath returns a value of type xml
(well, really xml[]) and 'AT&T' is not a legal value of that type;
only 'AT&T' is.
> I have NO WAY inside pgsql to get 'At&t' value
I agree that there ought to be an "unescape" function that would convert
this back to 'AT&T', but the lack of one seems like a missing feature not
a bug. I'd wonder for example what an unescape function ought to do with
other markup such as '<name>'.
The last concrete discussion we had on this seems to have been
this thread:
http://www.postgresql.org/message-id/flat/C71079E6-12D8-4048-B8C5-18368936FD5D@phlo.org
which petered out for lack of anyone finding the time to investigate
the relevant standards.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, onic@live.fr
Subject: Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath
In-Reply-To: <32376.1463680578@sss.pgh.pa.us>
References: <20160519150037.12503.16@wrigleys.postgresql.org> <32376.1463680578@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox