Re: protocol compatibility between 7.2 and 7.4

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: protocol compatibility between 7.2 and 7.4
Date: 2003-11-26 13:45:04
Message-ID: 1069854304.22025.1548.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The 7.4 psql most certainly will connect to a 7.2.4, and a 7.2.4 psql
will connect to a 7.4 server...

root(at)phppgadmin:~# cd /usr/local/pgsql-7.4/bin/
root(at)phppgadmin:/usr/local/pgsql-7.4/bin# ./psql -p5472 -Upostgres
phppgadmin
Welcome to psql 7.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

phppgadmin=> select version();
version
---------------------------------------------------------------
PostgreSQL 7.2.4 on i586-pc-linux-gnu, compiled by GCC 2.95.3
(1 row)

phppgadmin=> \q
root(at)phppgadmin:/usr/local/pgsql-7.4/bin# cd /usr/local/pgsql-7.2.4/bin/
root(at)phppgadmin:/usr/local/pgsql-7.2.4/bin# ./psql -p5474 -Upostgres
phppgadmin
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

phppgadmin=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.4 on i586-pc-linux-gnu, compiled by GCC 2.95.3
(1 row)

phppgadmin=# \q
root(at)phppgadmin:/usr/local/pgsql-7.2.4/bin#

your problem is that the psql program is not version aware, so the
shorthand command like \dt or \df will only work against the specific
version that psql is released with. There has been talk of making psql
more backward knowledgeable, check the archives for many discussions on
this topic.

you also might want to try a different admin tool, some of them, like
phpPgAdmin, are able to function completely across versions.

Robert Treat

On Wed, 2003-11-26 at 08:12, Daniel Kalchev wrote:
> I know this is an attempt to save myself reading the mailing list, but still
> the issue remains:
>
> the psql from version 7.4 does not talk to a 7.2.4 database.
>
> The CHANGELOG indicates, that both server and libraries keep compatibility
> with versions after 6.3 - still there is no switch in psql to specify usage of
> the pre-7.3 protocol and the 7.2 server and 7.4 psql apparently do not
> negotiate.
>
> Daniel
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oli Sennhauser 2003-11-26 13:48:09 Re: pg_restore and create FK without verification check
Previous Message Peter Eisentraut 2003-11-26 13:33:25 Re: protocol compatibility between 7.2 and 7.4