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

> ​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

Reply via email to