pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
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: Wed, 6 Sep 2017 20:58:57 +0200 (CEST)
Message-ID: <alpine.DEB.2.20.1709062042300.17848@lancre> (raw)
In-Reply-To: <31190.1504723050@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>
	<CANP8+jLGoZKRA-HT2yqfg4YJiPsJ+qe0aKTpGbNsntbz-396WQ@mail.gmail.com>
	<alpine.DEB.2.20.1709052051590.17848@lancre>
	<CANP8+jLauL-q4=jynt=y8NpL7JXM1hjtywqLn5ha-cxLEqgjNA@mail.gmail.com>
	<18953.1504705115@sss.pgh.pa.us>
	<CANP8+jJvqSFYFyWnhOWVTbT=kv3NmV7viywe11PEauKoLF+ueg@mail.gmail.com>
	<2597.1504714572@sss.pgh.pa.us>
	<alpine.DEB.2.20.1709061945240.17848@lancre>
	<31190.1504723050@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (19+ messages)

Message-ID: <alpine.DEB.2.20.1709062042300.17848@lancre>
Permalink:  ../alpine.DEB.2.20.1709062042300.17848@lancre/
Also on:    postgresql.org/message-id/alpine.DEB.2.20.1709062042300.17848@lancre

 · 

reply

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: coelho@cri.ensmp.fr, tgl@sss.pgh.pa.us, simon@2ndquadrant.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
  In-Reply-To: <alpine.DEB.2.20.1709062042300.17848@lancre>
  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> <alpine.DEB.2.20.1709052051590.17848@lancre> <CANP8+jLauL-q4=jynt=y8NpL7JXM1hjtywqLn5ha-cxLEqgjNA@mail.gmail.com> <18953.1504705115@sss.pgh.pa.us> <CANP8+jJvqSFYFyWnhOWVTbT=kv3NmV7viywe11PEauKoLF+ueg@mail.gmail.com> <2597.1504714572@sss.pgh.pa.us> <alpine.DEB.2.20.1709061945240.17848@lancre> <31190.1504723050@sss.pgh.pa.us> <alpine.DEB.2.20.1709062042300.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