Re: WIP: psql default banner patch v3 - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: WIP: psql default banner patch v3
Date
Msg-id 20080423094343.5704c350@commandprompt.com
Whole thread Raw
In response to Re: WIP: psql default banner patch v3  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: WIP: psql default banner patch v3  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-hackers
On Wed, 23 Apr 2008 12:38:22 -0400
Alvaro Herrera <alvherre@commandprompt.com> wrote:

> Joshua D. Drake wrote:
> 
> > O.k. here is version 3 of the patch.
> > 
> > It is the same patch except that on standard connect it emits the
> > client version. It does not emit the server version unless their is
> > a mismatch. Does that make sense?
> 
> But you didn't fix any of the whitespace issues I mentioned ...

Yes I did. The warning line looks like:

jd@scratch:~/pgsql/src/bin/psql$ ./psql -U jd -h localhost postgres
psql 8.4devel
WARNING: Server version 8.2, psql version 8.4. psql features may not work.

Type: help for help. 


I did add tabs so the message would stand out more but that isn't
really any different than the old banner message.

> 
> Also, I don't think there's anyone pushing for not showing the version
> at normal start, except you.
> 

The version is shown:

jd@scratch:~/pgsql/src/bin/psql$ ./psql -U jd -h localhost -p9000
postgres
psql 8.4devel

Type: help for help. 
postgres=# 

I left off server version because there doesn't seem to be a reason to
have it except if the server doesn't match. For example, Benjamin's
comment was:

--
To take a field example, I have one site where I run an 8.2 production
cluster, an 8.3 application testing cluster and my a personal 8.4devel
cluster for hacking postgres.

In such an environment, it's *very* useful to have instant feedback on
which server I've just connected to with psql.
--

Which this patch does supply.

Sincerely,

Joshua D. Drake



-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: WIP: psql default banner patch v3
Next
From: Simon Riggs
Date:
Subject: Re: Index AM change proposals, redux