Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing server version and psql version. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing server version and psql version.
Date
Msg-id 7437.1504634344@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing serverversion and psql version.  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing server version and psql version.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> 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.

Huh?  The variable will be set in any case.  It should be correct for any
server version we might find in the wild --- so far as I can tell from the
commit history, every version supporting FE/BE protocol version 3 has sent
server_version at connection start.  With a pre-7.4 server, it looks like
the variables would be set to "0.0.0" and "0" respectively.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] psql - add special variable to reflect the last querystatus