]> granicus.if.org Git - postgresql/commit
Teach libpq to decode server version correctly from future servers.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 5 Aug 2016 22:58:12 +0000 (18:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 5 Aug 2016 22:58:23 +0000 (18:58 -0400)
commita3cd60ebfdeffc6926a89c785674c56d260b3417
treed885417ecc4c32a8c2e30710b9cd3c445f704d5c
parent8080337b0a4bd5cad8e943b77e25b05c6d1e60ee
Teach libpq to decode server version correctly from future servers.

Beginning with the next development cycle, PG servers will report two-part
not three-part version numbers.  Fix libpq so that it will compute the
correct numeric representation of such server versions for reporting by
PQserverVersion().  It's desirable to get this into the field and
back-patched ASAP, so that older clients are more likely to understand the
new server version numbering by the time any such servers are in the wild.

(The results with an old client would probably not be catastrophic anyway
for a released server; for example "10.1" would be interpreted as 100100
which would be wrong in detail but would not likely cause an old client to
misbehave badly.  But "10devel" or "10beta1" would result in sversion==0
which at best would result in disabling all use of modern features.)

Extracted from a patch by Peter Eisentraut; comments added by me

Patch: <802ec140-635d-ad86-5fdf-d3af0e260c22@2ndquadrant.com>
src/interfaces/libpq/fe-exec.c