473,382 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

psql, 7.4, and the \d command

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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #1
4 2125
Brendan Jurd <bl*****@blakjak.sytes.net> writes:
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.
This has been discussed before. I think the reason for not doing it
has been the difficulty of coming up with a useful warning that explains
what will work and what won't. You suggest
WARNING: psql version is 7.4.1, but postgres server version is 7.3.4.
Some psql features may not function as expected.


but you've got to admit that's pretty vague and unhelpful.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #2


Tom Lane wrote:
Brendan Jurd <bl*****@blakjak.sytes.net> writes:

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.
This has been discussed before. I think the reason for not doing it
has been the difficulty of coming up with a useful warning that explains
what will work and what won't. You suggest
WARNING: psql version is 7.4.1, but postgres server version is 7.3.4.
Some psql features may not function as expected.


but you've got to admit that's pretty vague and unhelpful.

It is vague, but it's not unhelpful. Especially not when contrasted
with the current behaviour -- where the application carries on as though
nothing is amiss. It at least gives the user some indication that weird
errors during the session may be related to incompatibility. It makes
the user aware of a version discrepancy, which could be a useful prompt
for him to bring the two versions into accord, if desired. It also
tells the user what version the server is running, which the current
psql fails to do -- it merely reports the client version.

It's not a catch-all solution, but it does have some benefits, and, as
far as I can see, no real downsides.
regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #3
> This has been discussed before. I think the reason for not doing it
has been the difficulty of coming up with a useful warning that explains
what will work and what won't.


I think all that is necessary is to expand the startup banner to show
what the back end is:

Welcome to psql 7.4.1, the PostgreSQL interactive terminal.
Connected to PostgreSQL 7.3.4 server[@host]

This is similar to what some other front ends (ie, Oracle) do.
it may not be all that helpful in terms of explaining what will and what
won't work, but it unobtrusively identifies the back end for those who
need or want that information.

I would only display the host information if psql was called with -h.
--
Mike Nolan

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #4
On Tue, 17 Feb 2004, Tom Lane wrote:
Brendan Jurd <bl*****@blakjak.sytes.net> writes:
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.


This has been discussed before. I think the reason for not doing it
has been the difficulty of coming up with a useful warning that explains
what will work and what won't. You suggest
WARNING: psql version is 7.4.1, but postgres server version is 7.3.4.
Some psql features may not function as expected.


but you've got to admit that's pretty vague and unhelpful.


I'd rather something like:

WARNING: psql/pgsql client server version mismatch.
Things will break. You're on your own.

:-) At least it's honest
---------------------------(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

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
7
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also...
6
by: Ben | last post by:
I'm designing a fairly involved database system. As part fo the process, I use the \i command a great deal. I set up fairly involved queries, sometimes simply for the purpose of shortening column...
15
by: Dino Vliet | last post by:
Hi folks, probably this is a question you've heard so many times but I wasn't able to find a solution to it. I'm using a shell script to create a textfile for me. It looks like...
1
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each...
3
by: Anony Mous | last post by:
Hi, I've run into a problem. I've had postgres V8 beta on my WinXP Pro machine for some time now, and it's been running great. Now, for some reason, I cannot issue any queries to the database...
4
by: Kevin Murphy | last post by:
This is a tip for the record in case it helps somebody else in the future. I have an import script that relies on a stored procedure that runs as a trigger on inserts into a temporary table. ...
2
by: Dmitri Priimak | last post by:
Hi All. There is one thing which somewhat annoys me, which is that psql always prompts me for a password. That makes it difficult for use in Makefile where I want to say 'make build_db', which...
3
by: oksofar | last post by:
Hello - I'm running PG 8.1 on Windows XP. I've installed the server to run as a service. The psql command fails to connect to the server, although I can connect with other clients. When I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.