Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath
Дата
Msg-id 32376.1463680578@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath  (onic@live.fr)
Ответы Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: onic@live.fr
Дата:
Сообщение: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath