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

From Tom Lane
Subject Re: xpath processing brain dead
Date
Msg-id 6698.1235683449@sss.pgh.pa.us
Whole thread Raw
In response to Re: xpath processing brain dead  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: xpath processing brain dead
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> First, I propose that we abandon this mangling, if, and only if, the xml 
> is in fact a well formed XML document. Since the whole point of the 
> mangling is to handle situations where the XML is not a well formed 
> document, that seems fairly straight-forward. If this change were to 
> upset any user, it must be because they are relying on undisputably 
> incorrect results.

> Second, I propose that, in the remaining cases, where we do mangle the 
> XML, if the xpath expression does not begin with a '/', instead of 
> prepending it with '/x/, which can not possibly be correct under any 
> circumstance, we prepend it with '/x//' which has some possibility of 
> giving correct results.

Hmm, does this proposal require adding a test of well-formed-ness to
a code path that doesn't currently have one?  If so, is that likely
to contribute any noticeable slowdown?

I can't offhand see an objection to this other than possible performance
impact.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: xpath processing brain dead
Next
From: Bryce Cutt
Date:
Subject: Re: Proposed Patch to Improve Performance of Multi-BatchHash Join for Skewed Data Sets