Skip site navigation (1) Skip section navigation (2)

Re: RPM question: Where to put psycopg2 files

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: psycopg(at)postgresql(dot)org
Subject: Re: RPM question: Where to put psycopg2 files
Date: 2011-01-17 16:38:51
Message-ID: 20110117163851.GF2576@hermes.hilbert.loc (view raw, whole thread or download thread mbox)
Lists: psycopg
On Mon, Jan 17, 2011 at 02:53:16PM +0100, Federico Di Gregorio wrote:

> 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
> > ( 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.

However, the workaround should be as local as possible such
that other, global things stay unchanged. Hence IMO the
correct place for adding the workaround is not in the

	- server (postgresql.conf)
	- database (alter database set ...)
	- role (alter role set ...)
	- adaptor (psycopg2)

configuration but rather in the client code that needs it
(such as GNUmed). Other clients will be just fine with the
newer, more efficient setting with the same server,
database, and role.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

In response to

psycopg by date

Next:From: Karsten HilbertDate: 2011-01-17 16:42:10
Subject: Re: RPM question: Where to put psycopg2 files
Previous:From: Karsten HilbertDate: 2011-01-17 16:16:14
Subject: Re: RPM question: Where to put psycopg2 files

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group