psql, 7.4, and the \d command - Mailing list pgsql-general

From Brendan Jurd
Subject psql, 7.4, and the \d command
Date
Msg-id 4031CEC7.9020703@blakjak.sytes.net
Whole thread Raw
Responses Re: psql, 7.4, and the \d command
List pgsql-general
Hello all,

I just wanted to pass on some information about compatibility between
the psql client and the postgres server.

On a particular network, my workstation and the server are both debian
boxes, but the workstation is on a more frequent upgrade schedule.  The
server is still running postgres 7.3.4, but my workstation has been
upgraded with the latest (7.4.1) postgres client tools.

Now, the workstation's 7.4.1 psql client is able to connect to the 7.3.4
server and execute queries quite happily, but when I tried to use the \d
internal slash command to describe a table, I got the following:

ERROR:  Function pg_catalog.pg_get_triggerdef(oid) does not exist
        Unable to identify a function that satisfies the given argument
types
        You may need to add explicit typecasts

Since I didn't realise the difference in versions at the time, I had to
do a bit of digging to figure out what was going on.  Considering the
actual cause of the problem, this error message was utterly unhelpful,
even slightly detrimental, since it made me suspect that my database was
missing some important internal function.

I'm not objecting to the incompatibility itself, but I do think more
information needs to be provided to the user.  I humbly suggest that if
psql is not going to be fully backwards-compatible with previous
postgres backends, at the very least you should issue a warning when
psql connects to a partially compatible server.  Something simple like ...

WARNING: psql version is 7.4.1, but postgres server version is 7.3.4.
Some psql features may not function as expected.

... would do the trick nicely.

Thanks

BJ

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cascade delete triggers change user credentials
Next
From: Antonios Christofides
Date:
Subject: Re: Cascade delete triggers change user credentials