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