Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected
Дата
Msg-id 1310645715.16381.2.camel@fsopti579.F-Secure.com
обсуждение исходный текст
Ответ на Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Список pgsql-hackers
On ons, 2011-07-13 at 11:58 +0200, Nicolas Barbier wrote:
> 2011/6/29, Florian Pflug <fgp@phlo.org>:
> 
> > Secondly, there is little point in having an type XML if we
> > don't actually ensure that values of that type can only contain
> > well-formed XML.
> 
> +1. The fact that XPATH() must return a type that cannot depend on the
> given expression (even if it is a constant string) may be unfortunate,
> but returning XML-that-is-not-quite-XML sounds way worse to me.

The example given was
   XPATH('/*/text()', '<root><</root>')

This XPath expression returns a node set, and XML is a serialization
format of a node, so returning xml[] in this particular case seems
entirely reasonable to me.



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Understanding GIN posting trees
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected