Re: Gripe: bytea_output default => data corruption

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
Cc: ljb <ljb9832(at)pobox(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Gripe: bytea_output default => data corruption
Date: 2010-10-21 21:29:11
Message-ID: 201010212129.o9LLTBl21612@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

Rajesh Kumar Mallah wrote:
> Dear Griper!,
>
> fortunately someone showed a easy 'fix'
>
> ALTER DATABASE foo SET bytea_output='escape' ;

Yes, we mentioned that setting in the release notes too:

E.2.3.5. Data Types

*

Allow bytea values to be written in hex notation (Peter
Eisentraut)

The server parameter bytea_output controls whether hex or
traditional format is used for bytea output. Libpq's PQescapeByteaConn()
function automatically uses the hex format when connected to PostgreSQL
9.0 or newer servers.

The new hex format will be directly compatible with more
applications that use binary data, allowing them to store and retrieve
it without extra conversion. It is also significantly faster to read and
write than the traditional format.

While the "Incompatibilities" section mentions only the first paragraph,
this remention lower down has even more details. Not sure what else you
wanted us to do.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message ljb 2010-10-21 23:12:40 Re: Gripe: bytea_output default => data corruption
Previous Message Bruce Momjian 2010-10-21 02:30:22 Re: Asynchronous I/O in Postgres

Browse pgsql-general by date

  From Date Subject
Next Message Szymon Guz 2010-10-21 21:35:07 Re: COPY question
Previous Message Raymond O'Donnell 2010-10-21 21:28:23 Re: COPY question