From: Simon Riggs <simon@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
Date: Tue, 5 Sep 2017 10:41:11 -0700
Message-ID: <CANP8+jLGoZKRA-HT2yqfg4YJiPsJ+qe0aKTpGbNsntbz-396WQ@mail.gmail.com> (raw)
In-Reply-To: <4782.1504630716@sss.pgh.pa.us>
References: <E1dpFCX-0004YD-E7@gemulon.postgresql.org>
<CANP8+j+WC3zXTJrMQgfX1_TB23FmWzbiN71yWThb0N4gdvBgZQ@mail.gmail.com>
<2774.1504628172@sss.pgh.pa.us>
<CA+TgmoZpe2YJdFLFH6YSka5TVX4VcsmT05cEXWOHxJ2wzCBE2w@mail.gmail.com>
<4782.1504630716@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 5 September 2017 at 09:58, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Tue, Sep 5, 2017 at 12:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> 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?
>
>> As I see it, the risks of back-patching are:
>
>> 1. Different minor versions will have different behavior, and that
>> tends to create more problems than it solves.
>
> Yeah. Whatever use-case you think might exist for these variables in,
> say, 9.6 is greatly weakened by the fact that releases through 9.6.5
> don't have them.
Makes sense
> However, since v10 is still in beta I don't think that argument
> applies to it.
OK
Does raise the further question of how psql behaves when we connect to
a pre-10 server, so we have SERVER_VERSION_NUM but yet it is not set.
How does this
\if SERVER_VERSION_NUM < x
behave if unset? Presumably it fails, even though the version *is* less than x
Do we need some macro or suggested special handling?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: simon@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
In-Reply-To: <CANP8+jLGoZKRA-HT2yqfg4YJiPsJ+qe0aKTpGbNsntbz-396WQ@mail.gmail.com>
References: <E1dpFCX-0004YD-E7@gemulon.postgresql.org> <CANP8+j+WC3zXTJrMQgfX1_TB23FmWzbiN71yWThb0N4gdvBgZQ@mail.gmail.com> <2774.1504628172@sss.pgh.pa.us> <CA+TgmoZpe2YJdFLFH6YSka5TVX4VcsmT05cEXWOHxJ2wzCBE2w@mail.gmail.com> <4782.1504630716@sss.pgh.pa.us> <CANP8+jLGoZKRA-HT2yqfg4YJiPsJ+qe0aKTpGbNsntbz-396WQ@mail.gmail.com>
* 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