Re: xpath processing brain dead

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Subject: Re: xpath processing brain dead
Date: 2009-02-26 21:24:09
Message-ID: 6698.1235683449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Lor 2009-02-26 22:29:59 DTrace doc patch for new probes in 8.4
Previous Message Andrew Dunstan 2009-02-26 20:59:59 Re: xpath processing brain dead