Re: Problem with bytea

From: Joe Conway <mail(at)joeconway(dot)com>
To: daniel(dot)carlsson(at)gimlisoft(dot)se
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with bytea
Date: 2003-06-07 15:43:09
Message-ID: 3EE2080D.1060409@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Carlsson wrote:
> When a fetch binary data from a bytea column the data gets messed up.
>
> Se the attached code, postgresql returns 13744 bytes when it should
> be only 10000. After studing the output I saw that bytes representing
> common characters are fetched ok but bytes representing unusual
> characters such as special swedish characters are messed up. Is the
> binary data somewhere treated as character data?

Yes, for output all "non-printable" characters are octal escaped. See:
http://www.us.postgresql.org/postgresql-7.3.3/datatype-binary.html

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Steffen 2003-06-07 15:46:12 Re: update phenomenom
Previous Message Joe Conway 2003-06-07 15:40:08 Re: [GENERAL] Bug in metaphone (contrib/fuzzystrmatch)