Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected
Date
Msg-id BC66B446-29EC-44FA-8860-7165F5105BDA@gmail.com
Whole thread Raw
In response to Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected
List pgsql-hackers
On Jul 10, 2011, at 1:40 PM, Josh Berkus <josh@agliodbs.com> wrote:

> Hackers,
>
>>> B. 6. Current behaviour _is intended_ (there is "if"  to check node type) and _"natural"_. In this particular case
userask for text content of some node, and this content is actually "<". 
>>
>> I don't buy that. The check for the node type is there because
>> two different libxml functions are used to convert nodes to
>> strings. The if has absolutely *zero* to do with escaping, expect
>> for that missing escape_xml() call in the "else" case.
>>
>> 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.
>
> Can anyone else weigh in on this? Peter?

Unless I am missing something, Florian  is clearly correct here.

...Robert

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: reducing the overhead of frequent table locks, v4
Next
From: Noah Misch
Date:
Subject: Re: Kaigai's current patches -- review, commit status