Re: Problem with bytea - Mailing list pgsql-general

From Joe Conway
Subject Re: Problem with bytea
Date
Msg-id 3EE2080D.1060409@joeconway.com
Whole thread Raw
In response to Problem with bytea  (Daniel Carlsson <daniel.carlsson@gimlisoft.se>)
List 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




pgsql-general by date:

Previous
From: "Henrik Steffen"
Date:
Subject: Re: update phenomenom
Next
From: Jan Wieck
Date:
Subject: Re: update phenomenom