Re: Patch to change psql default banner v6

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to change psql default banner v6
Date: 2008-05-15 16:12:36
Message-ID: 200805151612.m4FGCak22641@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Oh, good point. Let me look at that. Thanks. You prefer:
>
> > $ sql test
> > psql (8.4devel)
> > Type "help" for help.
>
> > test=> help
>
> Well, the question is still "where is the optional info going to go?"
>
> I think what I'd find nice looking is
>
> $ psql test
> psql 8.4devel [ server version warning here, if needed ]
> [ line with SSL info here, if needed ]
> Type "help" for help.
>
> test=>
>
> I do feel that the help statement ought to be on its own line;
> the other way is going to look cluttered, particularly as soon
> as there's a version warning in there.

OK, here is the normal startup now:

$ sql test
psql (8.4.0)
Type "help" for help.

test=>

Here is a minor version mismatch:

$ sql test
psql (8.4.0, server 8.4.1)
Type "help" for help.

test=>

Here is a major version mismatch:

$ sql test
psql (8.4.0, server 8.3.1)
WARNING: psql version 8.4.0, server version 8.3.1.
Some psql features might not work.
Type "help" for help.

test=>

I have also added '\g' to the 'help' display:

test=> help

You are using psql, the command-line interface to PostgreSQL.
\? for psql help
\h or \help for SQL help

\g or ";" to execute a query
\q to quit psql

\copyright to view the copyright

test=>

I don't know how to generate an SSL message.

With the new smaller \? "General" section, I though it was worth
considering if we still want to do the help banner the same. Obviously
we do, but I wanted to explore it.

Patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
unknown_filename text/plain 4.9 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ron Mayer 2008-05-15 17:20:53 Re: Patch to change psql default banner v6
Previous Message Tom Lane 2008-05-15 16:09:31 Re: libpq object hooks