Re: Version checking when loading psql

Lists: pgsql-generalpgsql-patches
From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Version checking when loading psql
Date: 2001-11-19 18:47:51
Message-ID: E165tSR-0008TG-00@mclean.mail.mindspring.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

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

Attached is a little patch that simply verifies that the
version of psql you are running is the same as the version
of postgresql you are attaching to. Handy for those times
when you have multiple versions running on different ports,
then put in the wrong port number and post something to
the hackers list wondering why function x is not working.... :)

It spits out a little warning message if the versions are
different, but other than that lets you continue to shoot
yourself in the foot.

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

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

iQA/AwUBO/lNKbybkGcUlkrIEQJDegCeLr3mEJp82GoTzcOAgLgN3+x+6i0An2mE
HBN+xFOJx/M5bV+bzgXXpwF2
=aaM4
-----END PGP SIGNATURE-----

Attachment Content-Type Size
unknown_filename text/plain 955 bytes

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Version checking when loading psql
Date: 2001-11-20 21:42:13
Message-ID: Pine.LNX.4.30.0111201440010.613-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

Greg Sabino Mullane writes:

> Attached is a little patch that simply verifies that the
> version of psql you are running is the same as the version
> of postgresql you are attaching to.

I'm sure this would annoy people.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 15:12:02
Message-ID: 13671.1006355522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

[ redirected from patches to general ]

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Greg Sabino Mullane writes:
>> Attached is a little patch that simply verifies that the
>> version of psql you are running is the same as the version
>> of postgresql you are attaching to.

> I'm sure this would annoy people.

I'm of two minds about it. It'd annoy *me*, but I know we have seen
trouble reports from people who were using version-mismatched psql
and didn't understand why some \d commands didn't work. Maybe we
should be catering more to newbies here.

Any other opinions out there?

regards, tom lane


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: Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 15:32:06
Message-ID: 200111211532.fALFW6L04198@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

> > I'm sure this would annoy people.
>
> I'm of two minds about it. It'd annoy *me*, but I know we have seen
> trouble reports from people who were using version-mismatched psql
> and didn't understand why some \d commands didn't work. Maybe we
> should be catering more to newbies here.
>
> Any other opinions out there?

Seems heavy-handed to warn each time. Could we plop a file in the
user's home directory and warn the first time it doesn't match? That
seems like overkill too. :-)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 15:39:08
Message-ID: Pine.BSF.4.40.0111211036430.44817-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

On Wed, 21 Nov 2001, Tom Lane wrote:

> [ redirected from patches to general ]
>
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Greg Sabino Mullane writes:
> >> Attached is a little patch that simply verifies that the
> >> version of psql you are running is the same as the version
> >> of postgresql you are attaching to.
>
> > I'm sure this would annoy people.
>
> I'm of two minds about it. It'd annoy *me*, but I know we have seen
> trouble reports from people who were using version-mismatched psql
> and didn't understand why some \d commands didn't work. Maybe we
> should be catering more to newbies here.
>
> Any other opinions out there?

I'd rather know than not know. But anything more than a warning on
connect would be truly annoying. We've had mismatches on the hub
machines.

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 15:56:18
Message-ID: 14160.1006358178@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net> writes:
>> Any other opinions out there?

> I'd rather know than not know. But anything more than a warning on
> connect would be truly annoying.

It was only a warning, not a refusal to proceed --- I doubt anyone
would hold still for the latter.

One point that may or may not sway anyone's opinion is that this would
require an extra query cycle during psql startup, meaning slower psql
launch.

regards, tom lane


From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 15:58:44
Message-ID: Pine.BSF.4.40.0111211058290.44817-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

On Wed, 21 Nov 2001, Tom Lane wrote:

> Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net> writes:
> >> Any other opinions out there?
>
> > I'd rather know than not know. But anything more than a warning on
> > connect would be truly annoying.
>
> It was only a warning, not a refusal to proceed --- I doubt anyone
> would hold still for the latter.
>
> One point that may or may not sway anyone's opinion is that this would
> require an extra query cycle during psql startup, meaning slower psql
> launch.

And after \connect ??

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================


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: Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 16:49:04
Message-ID: 200111211649.fALGn4m16883@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

> Vince Vielhaber <vev(at)zippy(dot)pop4(dot)net> writes:
> >> Any other opinions out there?
>
> > I'd rather know than not know. But anything more than a warning on
> > connect would be truly annoying.
>
> It was only a warning, not a refusal to proceed --- I doubt anyone
> would hold still for the latter.
>
> One point that may or may not sway anyone's opinion is that this would
> require an extra query cycle during psql startup, meaning slower psql
> launch.

Ewe, that is a negative.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 19:03:14
Message-ID: 20011121140314.T25493@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

On Wed, Nov 21, 2001 at 10:12:02AM -0500, Tom Lane wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Greg Sabino Mullane writes:
> >> Attached is a little patch that simply verifies that the
> >> version of psql you are running is the same as the version
> >> of postgresql you are attaching to.
>
> > I'm sure this would annoy people.
>
> I'm of two minds about it. [. . .]
>
> Any other opinions out there?

Depends what it'd do. If it would disconnect you, well then, very
bad. If it would just send a warning ("mismatched psq & postgres:
some features may not work"), well, nothing wrong with that. It
might cut down on the questions and such. But if it disables you
completely, well, ug. No functionality is certainly worse than
limited functionality.

A

--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-21 22:12:06
Message-ID: Pine.LNX.4.30.0111212203080.614-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

Tom Lane writes:

> I'm of two minds about it. It'd annoy *me*, but I know we have seen
> trouble reports from people who were using version-mismatched psql
> and didn't understand why some \d commands didn't work. Maybe we
> should be catering more to newbies here.

Maybe only print the warning when a \d command is used (immediately
before or after). However, I'd much rather make the \d commands
compatible a version or two back.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: "Colin 't Hart" <cthart(at)yahoo(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Version checking when loading psql
Date: 2001-11-22 11:14:54
Message-ID: 9timpb$2gav$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

Why not do like the DBMS that we (partially) emulate :-)
and show the versions of the psql app and the server to
which you are connected?

Does psql have a verbose mode where this could be switched
on?

Cheers,

Colin


From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PATCHES] Version checking when loading psql
Date: 2001-11-22 14:14:56
Message-ID: Pine.LNX.4.33L2.0111220131560.16910-100000@aguila.protecne.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-patches

On Wed, 21 Nov 2001, Tom Lane wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Greg Sabino Mullane writes:
> >> Attached is a little patch that simply verifies that the
> >> version of psql you are running is the same as the version
> >> of postgresql you are attaching to.
>
> > I'm sure this would annoy people.
>
> I'm of two minds about it. It'd annoy *me*, but I know we have seen
> trouble reports from people who were using version-mismatched psql
> and didn't understand why some \d commands didn't work. Maybe we
> should be catering more to newbies here.

What about refusing to connect with unmatching versions unless you have
some environment variable set?

This way, newbies will have their connection refused and will have to
take some action (at least read some docs as to how to make it work),
but those who know better can just use it right away.

--
Alvaro Herrera (<alvherre[(at)]atentus(dot)com>)
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)