Re: [HACKERS] Version number in psql banner

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Darcy Buskermolen <darcy(at)wavefire(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Version number in psql banner
Date: 2005-09-03 00:39:52
Message-ID: 200509030039.j830dqd16598@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Darcy Buskermolen <darcy(at)wavefire(dot)com> writes:
> > Yes I've seen the same frustration from users, I think the banner should say
> > something along the lines of "psql client version foo connected to server bar
> > version sfoo"
>
> That seems overly verbose, particularly in the normal case where the
> versions are indeed the same. I could live with seeing a display like
> that when the versions are different.
>
> The other question is what counts as "different" --- do we want to
> complain like this if the minor versions are different?

I updated the patch. This gives psql three output displays on startup:

full match:

Welcome to psql 8.1beta1, the PostgreSQL interactive terminal.

major match:

Welcome to psql, the PostgreSQL interactive terminal.
psql version 8.19, server version 8.1

and non-major match:

WARNING: You are connected to a server with major version 8.1,
but your psql client is major version 8.2. Informational backslash
commands, like \d, might not work properly.

Welcome to psql, the PostgreSQL interactive terminal.
psql version 8.29, server version 8.1

Patch attached.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-09-03 00:41:48 Re: Remove xmin and cmin from frozen tuples
Previous Message Manfred Koizar 2005-09-02 23:25:06 Re: Remove xmin and cmin from frozen tuples

Browse pgsql-patches by date

  From Date Subject
Next Message Stephan Szabo 2005-09-03 05:16:07 Re: [PATCHES] Work-in-progress referential action trigger timing
Previous Message Andrew Dunstan 2005-09-02 22:44:07 Re: Note that spaces between QUOTE and DELIMITER are included