Re: version mismatch detection doesn't work

Lists: pgsql-hackers
From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: version mismatch detection doesn't work
Date: 2002-09-28 04:39:27
Message-ID: 20020928003927.71ed905f.alvherre@atentus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hackers,

Seems the functionality to detect old versions of the postmaster with
newer psql doesn't work. Here, server is 7.2.1:

$ psql alvherre
ERROR: parser: parse error at or near "."
Welcome to psql 7.3b1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

alvherre=> select version();
version
-------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

alvherre=>

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Nunca confiaré en un traidor. Ni siquiera si el traidor lo he creado yo"
(Barón Vladimir Harkonnen)


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: version mismatch detection doesn't work
Date: 2002-09-28 05:03:24
Message-ID: 200209280503.g8S53OU10934@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


I didn't think we were supposed to throw an error on a mismatch, were
we?

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Hackers,
>
> Seems the functionality to detect old versions of the postmaster with
> newer psql doesn't work. Here, server is 7.2.1:
>
> $ psql alvherre
> ERROR: parser: parse error at or near "."
> Welcome to psql 7.3b1, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help on internal slash commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> alvherre=> select version();
> version
> -------------------------------------------------------------
> PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
> (1 row)
>
> alvherre=>
>
> --
> Alvaro Herrera (<alvherre[a]atentus.com>)
> "Nunca confiar? en un traidor. Ni siquiera si el traidor lo he creado yo"
> (Bar?n Vladimir Harkonnen)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: version mismatch detection doesn't work
Date: 2002-09-28 16:14:54
Message-ID: 12840.1033229694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> Seems the functionality to detect old versions of the postmaster with
> newer psql doesn't work.

What functionality? psql has never had such a test. I think you
are thinking of pg_dump.

regards, tom lane


From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: version mismatch detection doesn't work
Date: 2002-09-28 16:28:11
Message-ID: Pine.LNX.4.44.0209281224050.20389-100000@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane dijo:

> Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> > Seems the functionality to detect old versions of the postmaster with
> > newer psql doesn't work.
>
> What functionality? psql has never had such a test. I think you
> are thinking of pg_dump.

No, I was thinking of psql. There was a discussion some time ago about
mismatching versions; I don't know where I got the idea that the
conclusion had been that if versions mismatched, psql would barf. (The
conclusion was to add the version number to psql.)

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"No hay ausente sin culpa ni presente sin disculpa" (Prov. frances)


From: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: version mismatch detection doesn't work
Date: 2002-09-28 18:48:21
Message-ID: 1033238903.10856.28.camel@mouse.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

It was I that originally brought the topic up. I don't really remember
the exact details but I do seem to recall that the author thought it was
a horrid idea. Basically and poorly paraphrased the response was that
everyone should use select version() after they connect and if they
don't know to do that or simply forget, that's tough. I also seem to
recall that even the prospect of having some slash command that showed
psql and back end version was considered a waste and a bad/redundant
idea. So, as it stands, only the psql version is displayed.

I still think it makes so much more sense to simply state something
like, "Welcome to psql 7.3b1, the PostgreSQL interactive terminal. You
are currently connected with a 7.1.1 server named 'foobar'". It's
simple and makes the information very obvious. It also helps re-enforce
the name of the server that you've connected with. I should clarify,
the host name par is not something I originally asked about but does
seem to make sense. I honestly could care less about the exact text as
making the information obviously available is all that I care really
about.

Personally, I never understood how making even marginally redundant
information readily and obviously available, especially when it can
prevent some potential peril, is a bad idea. But, for each is own. ;)

Greg

On Sat, 2002-09-28 at 11:28, Alvaro Herrera wrote:
> Tom Lane dijo:
>
> > Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> > > Seems the functionality to detect old versions of the postmaster with
> > > newer psql doesn't work.
> >
> > What functionality? psql has never had such a test. I think you
> > are thinking of pg_dump.
>
> No, I was thinking of psql. There was a discussion some time ago about
> mismatching versions; I don't know where I got the idea that the
> conclusion had been that if versions mismatched, psql would barf. (The
> conclusion was to add the version number to psql.)
>
> --
> Alvaro Herrera (<alvherre[a]atentus.com>)
> "No hay ausente sin culpa ni presente sin disculpa" (Prov. frances)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly