Re: protocol compatibility between 7.2 and 7.4 - Mailing list pgsql-hackers

From Robert Treat
Subject Re: protocol compatibility between 7.2 and 7.4
Date
Msg-id 1069854304.22025.1548.camel@camel
Whole thread Raw
In response to protocol compatibility between 7.2 and 7.4  (Daniel Kalchev <daniel@digsys.bg>)
List 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@phppgadmin:~# cd /usr/local/pgsql-7.4/bin/
root@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@phppgadmin:/usr/local/pgsql-7.4/bin# cd /usr/local/pgsql-7.2.4/bin/
root@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@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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: protocol compatibility between 7.2 and 7.4
Next
From: Oli Sennhauser
Date:
Subject: Re: pg_restore and create FK without verification check