Re: PostgreSQL vs SQL/XML Standards

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: PostgreSQL vs SQL/XML Standards
Дата
Msg-id 5C3BE8CE.8010606@anastigmatix.net
обсуждение исходный текст
Ответ на Re: PostgreSQL vs SQL/XML Standards  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: PostgreSQL vs SQL/XML Standards  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
There is a bug that remains, in the
else if (xpathobj->type == XPATH_STRING)
case.

As it is now, it simply passes the string value of the result
into the output column's type-input function, regardless of the
output column type.

If the output column type is xml, this will attempt to parse the
string as xml. The result should simply be xml content consisting of
a text node representing the string (as by XMLTEXT()). If it contains
XML metacharacters, they should be escaped.

For a non-xml output column, the string should be used directly,
as it is now.

# select * from xmltable('.' passing xmlelement(name a)
columns a text path '"<foo/>"', b xml path '"<foo/>"');
   a    |   b
--------+--------
 <foo/> | <foo/>

Oracle fiddle for comparison:

https://dbfiddle.uk/?rdbms=oracle_18&fiddle=26f91a9e55a6908c2bcf848b464ca381

A     B
<foo/>     <foo/>

-Chap


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

Предыдущее
От: Donald Dong
Дата:
Сообщение: Re: Ryu floating point output patch
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reducing header interdependencies around heapam.h et al.