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:16:14
Message-ID: 20110117161614.GE2576@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Mon, Jan 17, 2011 at 01:35:38PM +0000, Daniele Varrazzo wrote:

> >> You don't need that, because psycopg uses libpq that can connect to
> >> older versions of the backend.
> >>
> >> I don't know about RPMs but in Debian we have multiple versions of
> >> postgresql and only *one* libpqXX package (usually it comes from the
> >> most recent stable release). So my suggestion is to have only one
> >> version of psycopg linked to the most recent libpq package.
> >
> > This is not really the final solution.
> >
> > I've got a Debian/Squeeze machine which runs PG 9.0 from /Unstable.
> >
> > I've got a second Debian/Squeeze machine running PG 8.4 from /Squeeze.
> >
> > Both use the same psycopg2 from /Squeeze.
> >
> > Transferring bytea data from the 9.0 machine to the 8.4 one
> > does not work (other datatypes work fine).
>
> Using a psycopg with libpq < 9 to talk with postgres >= 9 yes, there
> is this problem. The other way around it works fine: psycopg+libpq 9
> passes all the tests even with a 7.4 server.
>
> 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)

Aha. I missed that.

> A workaround I was thinking about could be to send "SET bytea_output TO
> 'escape';" on connection

I fixed my client to issue that query on new connections.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Browse psycopg by date

  From Date Subject
Next Message Karsten Hilbert 2011-01-17 16:38:51 Re: RPM question: Where to put psycopg2 files
Previous Message Daniele Varrazzo 2011-01-17 15:34:01 Re: RPM question: Where to put psycopg2 files