From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Patch to change psql default banner v6 |
Date: | 2008-05-16 05:08:41 |
Message-ID: | 20080516050841.GA538@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Thu, May 15, 2008 at 03:21:37PM -0400, Bruce Momjian wrote:
> Alvaro Herrera wrote:
> >
> > I'm OK with thisG but please move the printSSLInfo() call just before
> > echoing the help line.
>
> Oh, good catch, moved. I also moved the Win32 code page message up too.
> Patch attached.
>
> I hacked up an example that shows both SSL and Win32 code page messages:
I believe there's a bug in this patch, namely that the warnings when
there's a server-client mismatch only appear at startup time. This is
a pretty clear POLA violation, IMHO.
On my laptop, I have two pg instances running: 8.3.0 on port 5432, CVS
TIP on 2225.
Here's what I get if I invoke psql from the command line:
$ psql -p 5432 postgres
Welcome to psql 8.4devel (server 8.3.0), the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
WARNING: You are connected to a server with major version 8.3,
but your psql client is major version 8.4. Some backslash commands,
such as \d, might not work properly.
Here's what I get if I use \c, having connected to CVS TIP first:
davidfetter(at)postgres=# \c - - - 5432
You are now connected to database "postgres" at port "5432".
I think that the warning should be consistently there on connect
instead of just at program start.
Not coincidentally, moving all the checks into one spot, i.e. making
startup.c and command.c call and test the same things to connect to a
database, advances my Evil Plan™ to make more interesting things
happen when switching versions :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-05-16 05:22:55 | Re: Patch to change psql default banner v6 |
Previous Message | Teodor Sigaev | 2008-05-16 05:05:54 | Re: Partial match in GIN (next vesrion) |