Re: XMLATTRIBUTES vs. values of type XML - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: XMLATTRIBUTES vs. values of type XML
Date
Msg-id 1311776315.5492.8.camel@fsopti579.F-Secure.com
Whole thread Raw
In response to XMLATTRIBUTES vs. values of type XML  (Florian Pflug <fgp@phlo.org>)
Responses Re: XMLATTRIBUTES vs. values of type XML
List pgsql-hackers
On tis, 2011-07-26 at 22:44 +0200, Florian Pflug wrote:
> While reviewing the (now applied) XPATH escaping patches, Radoslaw
> found one
> case where the previous failure of XPATH to escape its return value
> was offset
> by XMLATTRIBUTES insistence to escape all input values, even if
> they're
> already of type XML.
> 
> To wit, if you do
> 
>   SELECT XMLELEMENT(NAME "t", XMLATTRIBUTES('&'::XML AS "a"))
> 
> you get
> 
>      xmlelement     
> --------------------
>  <t a="&amp;"/> 

Per SQL standard, the attribute values may not be of type XML, so maybe
we should just prohibit it.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Pull up aggregate sublink (was: Parameterized aggregate subquery (was: Pull up aggregate subquery))
Next
From: Yeb Havinga
Date:
Subject: Re: Pull up aggregate sublink (was: Parameterized aggregate subquery (was: Pull up aggregate subquery))