Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, 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-06 18:58:57
Message-ID: alpine.DEB.2.20.1709062042300.17848@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


>> Thus short, simple but meaningful examples which show how to do something
>> useful with all that in the documentation may help people take advantage
>> of these new features.
>
> I don't have an objection to providing an example. I wasn't terribly
> impressed with Simon's version, but maybe we can do better.

That was just a quick idea to show how they could be used, probably it can
be improved.

> I think it should be concrete, not partly abstract; and likely it needs
> to be with \if not the variable proper.

ISTM that currently there is no "not". Maybe I do not understand your
sentence.

>> Given my experience with "\d*", I'm not sure I would assume that a new
>> psql feature would work with older servers.
>
> I don't recall anyone questioning whether PQserverVersion() would work
> with older servers. Being able to tell what version the server is is
> sort of the point, no? If there were a restriction on what it would
> work with, I would agree that that needs to be documented. But I
> don't think "yes, it really works" is a helpful use of documentation
> space.

Sure.

I can use psql without knowing that there is a libpq underneath, that it
contains a PQserverVersion function implemented since pg7, and that the
SERVER_VERSION_* variables introduced in pg10 or pg11 rely on that thus it
should work with pg7/8/9 as well. It is not obvious, as a new feature
could depend on any combination of server side functions, protocol
extension, client library functions or client code...

--
Fabien.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-09-06 20:48:10 pgsql: Allow SET STATISTICS on expression indexes
Previous Message Tom Lane 2017-09-06 18:37:30 Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-09-06 19:11:08 Re: why not parallel seq scan for slow functions
Previous Message Andres Freund 2017-09-06 18:45:37 Re: Fix performance of generic atomics