From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | xpath processing brain dead |
Date: | 2009-02-26 04:08:10 |
Message-ID: | 49A615AA.90606@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Gierth was just pointing out to me how badly broken our XPath
processing is.
For fear of passing an ill formed fragment of xml to the processor, we
strip the xml declaration if any and surround what's left with '<x>" and
'</x>' and prepend '/x' to the supposed xpath. This is just horrible. It
will break for every xpath expression that doesn't begin with a '/' and
probably for many that do.
This whole thing is a mess, and I suspect the only fix for now is to
undo all the mangling of both the xml and the xpath expression. If the
programmer passes an ill formed piece of xml to the processor that is
their lookout, but I think we should ensure that we give back correct
results on well formed input.
The only good piece of news is that the xpath procedures in contrib/xml2
don't apparently suffer these faults.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2009-02-26 04:09:58 | Re: 8.4 release planning (was Re: [COMMITTERS] pgsql: Automatic view update rules) |
Previous Message | KaiGai Kohei | 2009-02-26 04:04:40 | Updates of SE-PostgreSQL 8.4devel patches (r1627) |