From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgreSQL.org>
Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
Date: Tue, 5 Sep 2017 19:01:52 +0200 (CEST)
Message-ID: <alpine.DEB.2.20.1709051857100.17848@lancre> (raw)
In-Reply-To: <2774.1504628172@sss.pgh.pa.us>
References: <E1dpFCX-0004YD-E7@gemulon.postgresql.org>
<CANP8+j+WC3zXTJrMQgfX1_TB23FmWzbiN71yWThb0N4gdvBgZQ@mail.gmail.com>
<2774.1504628172@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
>> This is good. Please can we backpatch these are far as they will go
>> (easily)? There is very little risk in doing so and significant
>> benefits in being able to rely on scripts that know about versions.
>
> Hm. I think it would be a fine idea to push this change into v10,
> so that all psql versions that have \if would have these variables.
> However, I'm less enthused about adding them to the 9.x branches.
> Given the lack of \if, I'm not seeing a use-case that would justify
> taking any compatibility risk for.
>
> Opinions anyone?
I think that it is harmless and useful for v10, and mostly useless for
previous versions.
ISTM that the hack looking like:
\if false \echo BAD VERSION \q \endif
Allow to test a prior 10 version and stop. However testing whether a
variable is defined is not included yet, so differenciating between 10 and
11 would not be easy... thus having 10 => version available would be
significantly helpful for scripting.
--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: coelho@cri.ensmp.fr, tgl@sss.pgh.pa.us, simon@2ndquadrant.com
Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
In-Reply-To: <alpine.DEB.2.20.1709051857100.17848@lancre>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox