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

From Alvaro Herrera
Subject Re: WIP: psql default banner patch
Date
Msg-id 20080422215649.GK6912@alvh.no-ip.org
Whole thread Raw
In response to Re: WIP: psql default banner patch  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: WIP: psql default banner patch  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Joshua D. Drake wrote:

> Attached is v2 of this patch. The following changes have been made:
> 
>  * If there is not a version mismatch, psql tells you nothing but ask
> for help if you need it.
>  * If there is a version mismatch it tells you and still tells you to
> type help if you need it

Thanks.

> I have modified mainloop.c to deal with help in this instance.

I must admit I don't like the new wording in this patch.  There are
extraneous spaces, which I guess are there just because you don't want
to put the \\X command immediately followed by the sentence-finishing
dot.  The original wording avoided that just by having the \\X command
away from the end of the sentence.

> !             puts(_("\tTo view the copyright type \\c . \n"));

The copyright is show with \copyright, not \c.

>               if (pset.sversion / 100 != client_ver / 100)
> !                 printf(_("\nWARNING: Server %d.%d, %s is version %d.%d. Some psql features may not work.\n\n"),
> !                         pset.sversion / 10000, (pset.sversion / 100) % 100,
>                          pset.progname,
>                          client_ver / 10000, (client_ver / 100) % 100);

I think the warning should be two lines:

WARNING: Server is version %d.%d, %s is version %d.%d.
Some backslash commands may not work.


> +            printf(_("Type: help for help. \n"));
> + 

Here you have a pointless extraneous space.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RECORD.* doesn't work in Pl/PGSQL
Next
From: "Joshua D. Drake"
Date:
Subject: Re: WIP: psql default banner patch