Re: xpath processing brain dead

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 22:31:42
Message-ID: 603c8f070902261431m5820c188we08b180dc3d11887@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 26, 2009 at 3:54 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Robert Haas wrote:
>> But the change you're proposing seems like
>> it could CONCEIVABLY break a working application that counts on
>> PostgreSQL's particular flavor of misbehavior, and therefore it seems
>> questionable to put that into a stable branch.  The fact that the
>> application perhaps should not have been written that way to begin
>> with is neither here nor there.  We don't want people to be afraid of
>> upgrading to the latest point release when we fix, say, a backend
>> crash or a data corruption bug.
>
> Let me reiterate the changes that I propose, and again challenge you to
> provide a working counter-example if you believe it will break anything not
> currently broken, even cases involving fragments.
>
> 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.
>
> IOW, these proposals will expand the number of correct results from the
> code, without contributing any new incorrect cases. These changes are *very*
> conservative, as is usual when we fix things on stable branches.
>
> cheers
>
> andrew

You are right.

Nuff said,

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Pye 2009-02-27 00:19:17 Re: xpath processing brain dead
Previous Message Robert Lor 2009-02-26 22:29:59 DTrace doc patch for new probes in 8.4