Re: xml type and encodings - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: xml type and encodings
Date
Msg-id 200701152140.28845.peter_e@gmx.net
Whole thread Raw
In response to Re: xml type and encodings  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout wrote:
> The only real alternative is to treat xml more like bytea than text
> (ie, treat the input as a stream of octets).

bytea isn't "treated" any different than other data types.  You just 
have to take care in the client that you escape every byte greater than 
127.  The same option is available to you in xml, if you escape all 
suspicious characters using entities.  Then, the encoding declaration 
is immaterial anyway.  (Unless you allow UTF-16 into the picture, but 
let's say we exclude that implicitly.)

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Function execution costs 'n all that
Next
From: Peter Eisentraut
Date:
Subject: Re: xml type and encodings