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

Re: Libpq PGRES_COPY_BOTH - version compatibility

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Libpq PGRES_COPY_BOTH - version compatibility
Date: 2011-01-02 14:07:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On tis, 2010-12-28 at 13:13 +0100, Magnus Hagander wrote:
> My pg_streamrecv no longer works with 9.1, because it returns
> PGRES_COPY_BOTH instead of PGRES_COPY_OUT when initating a copy.
> That's fine.
> So I'd like to make it work on both. Specifically, I would like it to
> check for PGRES_COPY_BOTH if the server is 9.1 and PGRES_COPY_OUT if
> it's 9.0. Which can be done by checking the server version.

ISTM that the correct fix is to increment to protocol version number to
3.1 and send PGRES_COPY_OUT if the client requests version 3.0.  That's
what the version numbers are for, no?

In response to


pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-01-02 14:08:34
Subject: Re: Sync Rep Design
Previous:From: Tatsuo IshiiDate: 2011-01-02 14:01:59
Subject: Re: How to know killed by pg_terminate_backend

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