Re: [HACKERS] Version number in psql banner

Lists: pgsql-hackerspgsql-patches
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Version number in psql banner
Date: 2005-09-01 15:30:34
Message-ID: 200509011730.34394.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

A release or two ago we added the version number to the psql welcome banner.
I noticed that quite a few people interpret that as the server version.
Somehow, the explicit display of the version numbers leads them to make
inferences that they would otherwise not bother about. Has anyone else
experienced that? I suppose there was a reason we added the version number
there, but I can't recall it. Could we make that more clear?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Version number in psql banner
Date: 2005-09-01 16:31:25
Message-ID: 20050901163125.GB29941@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, Sep 01, 2005 at 05:30:34PM +0200, Peter Eisentraut wrote:
> A release or two ago we added the version number to the psql welcome banner.
> I noticed that quite a few people interpret that as the server version.
> Somehow, the explicit display of the version numbers leads them to make
> inferences that they would otherwise not bother about. Has anyone else
> experienced that? I suppose there was a reason we added the version number
> there, but I can't recall it. Could we make that more clear?

I think the rationale for not adding the server version is that you
could tell people to do "select version()", so it would be unneeded
verbosity, but certainly a lot of people doesn't even know they can do
that.

I think by far the easiest and clearest is to show both psql's version
and the server version. Not the whole "version()" string, as that is
too verbose -- just the version number.

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Cuando miro a alguien, ms me atrae cmo cambia que quin es" (J. Binoche)


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-01 16:31:55
Message-ID: 200509010931.56288.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Peter,

> A release or two ago we added the version number to the psql welcome
> banner. I noticed that quite a few people interpret that as the server
> version. Somehow, the explicit display of the version numbers leads them to
> make inferences that they would otherwise not bother about. Has anyone
> else experienced that? I suppose there was a reason we added the version
> number there, but I can't recall it. Could we make that more clear?

Well, Bruce just drafted a patch to warn when the PSQL version and the server
version don't match up, because of PSQL incompatibilities. However, that
won't help for minor versions.

--
Josh Berkus
Aglio Database Solutions
San Francisco


From: Darcy Buskermolen <darcy(at)wavefire(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-01 17:34:03
Message-ID: 200509011034.03350.darcy@wavefire.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thursday 01 September 2005 08:30, Peter Eisentraut wrote:
> A release or two ago we added the version number to the psql welcome
> banner. I noticed that quite a few people interpret that as the server
> version. Somehow, the explicit display of the version numbers leads them to
> make inferences that they would otherwise not bother about. Has anyone
> else experienced that? I suppose there was a reason we added the version
> number there, but I can't recall it. Could we make that more clear?

Yes I've seen the same frustration from users, I think the banner should say
something along the lines of "psql client version foo connected to server bar
version sfoo"

--
Darcy Buskermolen
Wavefire Technologies Corp.

http://www.wavefire.com
ph: 250.717.0200
fx: 250.763.1759


From: aly(dot)dharshi(at)telus(dot)net
To: Darcy Buskermolen <darcy(at)wavefire(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-01 18:44:50
Message-ID: Pine.LNX.4.63.0509011242400.15830@edtnas67.telus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, 1 Sep 2005, Darcy Buskermolen wrote:

> Yes I've seen the same frustration from users, I think the banner should say
> something along the lines of "psql client version foo connected to server bar
> version sfoo"

I second this, I think that something like "psl client version
8.03 connected to server db01 running PostgreSQL version 8.1" would be
real swell.

Cheers,

Aly.

--
Aly S.P Dharshi
aly(dot)dharshi(at)telus(dot)net

"A good speech is like a good dress
that's short enough to be interesting
and long enough to cover the subject"


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Darcy Buskermolen <darcy(at)wavefire(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-01 18:53:12
Message-ID: 5248.1125600792@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Darcy Buskermolen <darcy(at)wavefire(dot)com> writes:
> Yes I've seen the same frustration from users, I think the banner should say
> something along the lines of "psql client version foo connected to server bar
> version sfoo"

That seems overly verbose, particularly in the normal case where the
versions are indeed the same. I could live with seeing a display like
that when the versions are different.

The other question is what counts as "different" --- do we want to
complain like this if the minor versions are different?

regards, tom lane


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-01 22:18:25
Message-ID: 1125613105.3956.254.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, 2005-09-01 at 14:53 -0400, Tom Lane wrote:
> Darcy Buskermolen <darcy(at)wavefire(dot)com> writes:
> > Yes I've seen the same frustration from users, I think the banner should say
> > something along the lines of "psql client version foo connected to server bar
> > version sfoo"
>
> That seems overly verbose, particularly in the normal case where the
> versions are indeed the same. I could live with seeing a display like
> that when the versions are different.

Thats the way Oracle sql*plus has worked for years, so its fairly
acceptable to a great many people without too many questions.

> The other question is what counts as "different" --- do we want to
> complain like this if the minor versions are different?

Which is much harder to define and could itself have a bug in it, so I
prefer the verbose message.... its much better to know for certain every
time.

Best Regards, Simon Riggs


From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-02 04:34:37
Message-ID: 20050902043437.GD20265@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, Sep 01, 2005 at 11:18:25PM +0100, Simon Riggs wrote:
> On Thu, 2005-09-01 at 14:53 -0400, Tom Lane wrote:
> > Darcy Buskermolen <darcy(at)wavefire(dot)com> writes:
> > > Yes I've seen the same frustration from users, I think the banner should say
> > > something along the lines of "psql client version foo connected to server bar
> > > version sfoo"
> >
> > That seems overly verbose, particularly in the normal case where the
> > versions are indeed the same. I could live with seeing a display like
> > that when the versions are different.
>
> Thats the way Oracle sql*plus has worked for years, so its fairly
> acceptable to a great many people without too many questions.
>
> > The other question is what counts as "different" --- do we want to
> > complain like this if the minor versions are different?
>
> Which is much harder to define and could itself have a bug in it, so I
> prefer the verbose message.... its much better to know for certain every
> time.

I was going to mention that we should report server version info any
time we connect to a different server, though I guess \connect only
allows you to connect to a different database on the same server.

As a side note, there's a typo in \?:

\c[onnect] [DBNAME|- [USER]]

Note the | where there should be a ].
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com 512-569-9461


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Version number in psql banner
Date: 2005-09-02 05:03:47
Message-ID: 20050902050347.GA59734@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, Sep 01, 2005 at 11:34:37PM -0500, Jim C. Nasby wrote:
> As a side note, there's a typo in \?:
>
> \c[onnect] [DBNAME|- [USER]]
>
> Note the | where there should be a ].

Eh? Looks right to me; the | indicates an alternate, i.e., that
you can use either DBNAME or -. I often use - to connect to the
same database as a different user.

test=> \c - postgres
You are now connected as new user "postgres".
test=#

--
Michael Fuhr


From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: typo? was: Version number in psql banner
Date: 2005-09-02 05:38:31
Message-ID: 1125639511.6682.24.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Am Donnerstag, den 01.09.2005, 23:34 -0500 schrieb Jim C. Nasby:
> On Thu, Sep 01, 2005 at 11:18:25PM +0100, Simon Riggs wrote:

> As a side note, there's a typo in \?:
>
> \c[onnect] [DBNAME|- [USER]]
>
> Note the | where there should be a ].

No ;) The | stands for the alternative.
The whole block is optional, where
you can either type dbname or a hypen
for the database name - to be able to
just switch the user.


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Darcy Buskermolen <darcy(at)wavefire(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Version number in psql banner
Date: 2005-09-03 00:39:52
Message-ID: 200509030039.j830dqd16598@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Darcy Buskermolen <darcy(at)wavefire(dot)com> writes:
> > Yes I've seen the same frustration from users, I think the banner should say
> > something along the lines of "psql client version foo connected to server bar
> > version sfoo"
>
> That seems overly verbose, particularly in the normal case where the
> versions are indeed the same. I could live with seeing a display like
> that when the versions are different.
>
> The other question is what counts as "different" --- do we want to
> complain like this if the minor versions are different?

I updated the patch. This gives psql three output displays on startup:

full match:

Welcome to psql 8.1beta1, the PostgreSQL interactive terminal.

major match:

Welcome to psql, the PostgreSQL interactive terminal.
psql version 8.19, server version 8.1

and non-major match:

WARNING: You are connected to a server with major version 8.1,
but your psql client is major version 8.2. Informational backslash
commands, like \d, might not work properly.

Welcome to psql, the PostgreSQL interactive terminal.
psql version 8.29, server version 8.1

Patch attached.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.7 KB