From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com> |
Cc: | Florian Pflug <fgp(at)phlo(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected |
Date: | 2011-07-14 12:15:15 |
Message-ID: | 1310645715.16381.2.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On ons, 2011-07-13 at 11:58 +0200, Nicolas Barbier wrote:
> 2011/6/29, Florian Pflug <fgp(at)phlo(dot)org>:
>
> > Secondly, there is little point in having an type XML if we
> > don't actually ensure that values of that type can only contain
> > well-formed XML.
>
> +1. The fact that XPATH() must return a type that cannot depend on the
> given expression (even if it is a constant string) may be unfortunate,
> but returning XML-that-is-not-quite-XML sounds way worse to me.
The example given was
XPATH('/*/text()', '<root><</root>')
This XPath expression returns a node set, and XML is a serialization
format of a node, so returning xml[] in this particular case seems
entirely reasonable to me.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-07-14 12:15:33 | Re: Patch Review: Bugfix for XPATH() if text or attribute nodes are selected |
Previous Message | Heikki Linnakangas | 2011-07-14 12:09:22 | Understanding GIN posting trees |