Re: Bytea misconceptions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bytea misconceptions
Date: 2003-02-21 09:58:33
Message-ID: Pine.LNX.4.44.0302201624410.2544-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut writes:

> Example: Create a cluster with non-C CTYPE, create a LATIN1 database,
> create a table with a bytea column, and store something with non-ASCII
> characters in it. Then change the client encoding (to UNICODE, say) and
> read the data. I stored 'ätsch bätsch' and got 'Àtsch bÀtsch', which is
> not a suitable result for bytea data.

Another point that occured to me is that if you send bytea input that does
not exclusively contain escape sequences to the server, then you really
don't know what the server will store. Since character set conversion is
supposed to be transparent, the bytea type is broken from the ground up
and should be replaced (probably by the standard blob type).

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-02-21 10:03:20 Re: contrib Makefile's and OS X
Previous Message Christopher Kings-Lynne 2003-02-21 08:32:42 Re: Loss of cluster status