Re: 10.0 - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: 10.0
Date
Msg-id CAMsr+YG7xMKZDLPYa4HqdmB1N_zx2gn-atmcLQE6O2gpkuf3QQ@mail.gmail.com
Whole thread Raw
In response to Re: 10.0  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers


On 15 June 2016 at 06:48, David G. Johnston <david.g.johnston@gmail.com> wrote:
 

​We could stand to be more explicit here.  The docs for version() indicated the server_version_num should be used for "machine processing".

The implied correct way to access the canonical server version is thus:

SELECT current_setting('server_version_num');


Or get server_version from the GUC_REPORT params sent at connect-time, avoiding a round-trip. That's how drivers do it.

Client application should just ask their driver, they shouldn't need to be poking around to get the version directly.

It'd be better if server_version_num was also GUC_REPORT, but it isn't. I still think it should be.
 


--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: New design for FK-based join selectivity estimation
Next
From: Craig Ringer
Date:
Subject: Re: 10.0