Re: [PATCHES] Version checking when loading psql

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-26 19:03:22
Message-ID: E168QxR-0000yg-00@barry.mail.mindspring.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some followup comments, on the comments to my patch:
(Forgive me for not attributing names)

First, I'm surprised that there are arguments for not doing
this. Isn't version mismatching a Bad Thing? I recognize that
bleeding edge developers may understand why certain deeply
buried functions may suddenly stop working, but shouldn't
we be discouraging mismatches completely?

>How hard would it be to do the check only when reporting on
>a failed command.

I'd rather just post a warning at the beginning. No sense in
anyone getting too involved before realizing they are running
the wrong version.

> And after \connect ??

No effect. Connect merely connects you to a new database, not
a new server backend. The warning appears once, after the
intro help message, which leads me to:

> ...this would require an extra query cycle during psql
> startup, meaning slower psql launch.

>>Ewe, that is a negative.

Well, it simply calls "select version()" and does a few
C functions. On my system, I clocked the time to do all
this at 1/100th of a second, so this seems like a non-issue.

> Depends what it'd do. If it would disconnect you...

For those who may not have seen the original patch post,
it compares the version of psql with the postgresql
server, and outputs a one-line warning message if the
two are not equal. Users can then ignore or heed the
warning as they see fit. :)

Greg Sabino Mullane
greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200111261359

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBPAKRprybkGcUlkrIEQIFwACfbJLwNQ8V6Wpskl3J/C3hAIeWrioAn2Ei
Ly0hgn4W/LHjvFbXyt9lqHws
=KfAL
-----END PGP SIGNATURE-----

Browse pgsql-general by date

  From Date Subject
Next Message Mike Harding 2001-11-26 19:04:01 Re: Strange performance issue
Previous Message Jim Buttafuoco 2001-11-26 18:39:21 Re: pl/perl won't build under 7.1.3