From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. |
Date: | 2017-09-05 17:41:11 |
Message-ID: | CANP8+jLGoZKRA-HT2yqfg4YJiPsJ+qe0aKTpGbNsntbz-396WQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 5 September 2017 at 09:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Sep 5, 2017 at 12:16 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-09-05 17:59:04 | Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. |
Previous Message | Fabien COELHO | 2017-09-05 17:01:52 | Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. |
From | Date | Subject | |
---|---|---|---|
Next Message | Jesper Pedersen | 2017-09-05 17:47:38 | Re: Fix performance of generic atomics |
Previous Message | Tom Lane | 2017-09-05 17:38:42 | Re: PoC plpgsql - possibility to force custom or generic plan |