Re: WIP: psql default banner patch v3

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Zeugswetter Andreas OSB SD <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: psql default banner patch v3
Date: 2008-04-23 16:43:43
Message-ID: 20080423094343.5704c350@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 23 Apr 2008 12:38:22 -0400
Alvaro Herrera <alvherre(at)commandprompt(dot)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(at)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(at)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-04-23 16:48:59 Re: Index AM change proposals, redux
Previous Message Alvaro Herrera 2008-04-23 16:38:22 Re: WIP: psql default banner patch v3