Re: xml type and encodings

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, nikolay(at)samokhvalov(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: xml type and encodings
Date: 2007-01-15 20:40:28
Message-ID: 200701152140.28845.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-15 20:40:51 Re: [HACKERS] Autovacuum improvements
Previous Message Neil Conway 2007-01-15 20:35:32 Re: Function execution costs 'n all that