Re: RPM question: Where to put psycopg2 files

From: Federico Di Gregorio <federico(dot)digregorio(at)dndg(dot)it>
To: psycopg(at)postgresql(dot)org
Subject: Re: RPM question: Where to put psycopg2 files
Date: 2011-01-17 13:53:16
Message-ID: 4D3449CC.1090004@dndg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 17/01/2011 14:35, Daniele Varrazzo wrote:
> The problem is that postgres 9 uses by default the hex format instead
> of the escape format to represent bytea
> (http://www.postgresql.org/docs/9.0/static/datatype-binary.html) A
> workaround I was thinking about could be to send "SET bytea_output TO
> 'escape';" on connection in case of pre9-libpq/post9-server
> combination is detected. I hate it because I was trying to drop the
> "queries on connection" psycopg does (there used to be 3, now there is
> only one and I think the last one can be dropped as well).

Please lets not do that. psycopg can already be used with a lesser libpq
to connect to a newer backend _unless_ changes like the one in this
discussion. Solving this particular problem may seem a good thing but,
IMHO, it is just putting a workaround in the wrong place.

> Of course
> bytea_output can be set in the postgresql.conf too and it would make
> previous releases of psycopg work fine.

That's the correct workaround.

federico

--
Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
Studio Associato Di Nunzio e Di Gregorio http://dndg.it
I came like Water, and like Wind I go. -- Omar Khayam

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Harald Armin Massa 2011-01-17 14:00:28 Re: RPM question: Where to put psycopg2 files
Previous Message Daniele Varrazzo 2011-01-17 13:35:38 Re: RPM question: Where to put psycopg2 files