Skip site navigation (1) Skip section navigation (2)

Re: XML with invalid chars

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XML with invalid chars
Date: 2011-04-26 21:11:10
Message-ID: 20110426211110.GA21669@tornado.gateway.2wire.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Apr 25, 2011 at 07:25:02PM -0400, Andrew Dunstan wrote:
> I came across this today, while helping a customer. The following will  
> happily create a piece of XML with an embedded ^A:
>
>    select xmlelement(name foo, null, E'abc\x01def');
>
> Now, a ^A is totally forbidden in XML version 1.0, and allowed but only  
> as "&#x01;" or equivalent in XML version 1.1, and not as a 0x01 byte  
> (see <http://en.wikipedia.org/wiki/XML#Valid_characters>)
>
> ISTM this is something we should definitely try to fix ASAP, even if we  
> probably can't backpatch the fix.

+1.  Given that such a datum breaks dump+reload, it seems risky to do nothing at
all in the back branches.

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-04-26 21:17:48
Subject: Re: sequence privileges in information schema
Previous:From: Kevin GrittnerDate: 2011-04-26 21:09:25
Subject: Re: Proposal - asynchronous functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group