Re: 10.0

Craig Ringer <craig@2ndquadrant.com>

From: Craig Ringer <craig@2ndquadrant.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Merlin Moncure <mmoncure@gmail.com>, Jim Nasby <Jim.Nasby@bluetreble.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Josh berkus <josh@agliodbs.com>, David Fetter <david@fetter.org>, Thom Brown <thom@linux.com>, Dave Page <dpage@pgadmin.org>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2016-06-17T05:58:18Z
Lists: 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