Re: xpath processing brain dead - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: xpath processing brain dead
Date
Msg-id 49A85D0B.7010901@dunslane.net
Whole thread Raw
In response to Re: xpath processing brain dead  (Hannu Krosing <hannu@2ndQuadrant.com>)
Responses Re: xpath processing brain dead  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers

Hannu Krosing wrote:
> On Thu, 2009-02-26 at 13:51 -0500, Robert Haas wrote:
>   
>>> What I have proposed for 8.3 should not break a single case that currently
>>> behaves usefully. If anyone has a counter-example please show it.
>>>
>>> What I have proposed for 8.4 possibly would break current "useful" behaviour
>>> (FSVO "useful"), but should be done anyway on correctness grounds.
>>>       
>> I dunno, aren't XML document fragments sort of a pretty common case?
>>     
>
> I'd rather argue that xml datatype should not even accept anything but
> complete xml documents. Same as int field does not accept int[].
>
> Or maybe we rather need separate xmldocument and xmlforest/xmlfragments
> types in next releases and leave the "base" xml as it is but deprecated
> due to inability to fix it without breaking backwards compatibility.
>
>   

Some of the functions, including some specified in the standard, produce 
fragments. That's why we have the 'IS DOCUMENT' test.

You can also force validation as a document by saying  SET XML OPTION 
DOCUMENT;

cheers

andrew


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: B-tree "finish incomplete split" bug
Next
From: Andrew Dunstan
Date:
Subject: Re: xpath processing brain dead