![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The following bug has been logged online: Bug reference: 2701 Logged by: Seth Gordon Email address: sethg+pg (AT) ropine (DOT) com PostgreSQL version: 7.4.7 Operating system: Linux (Debian stable) Description: PQserverVersion function missing Details: The 8.0/8.1 documentation for libpq says the following about PQserverVersion: "Applications may use this to determine the version of the database server they are connected to. The number is formed by converting the major, minor, and revision numbers into two-decimal-digit numbers and appending them together. For example, version 7.4.2 will be returned as 70402, and version 8.1 will be returned as 80100 (leading zeroes are not shown). Zero is returned if the connection is bad." But libpq for 7.4.7 does not have this function. So this is either a bug in the 7.4 code or a bug in the 8.1 documentation. |
#3
| |||
| |||
|
|
Actually, the 8.0.X libpq function would still report 70401 if connected to a 7.4.1 database, |
#4
| |||
| |||
|
|
Bruce Momjian <bruce (AT) momjian (DOT) us> writes: Actually, the 8.0.X libpq function would still report 70401 if connected to a 7.4.1 database, That was exactly the reason why the docs were written like that. Using two examples that are both from the same major release doesn't seem to me to be an improvement. |
#5
| |||
| |||
|
|
Tom Lane wrote: Bruce Momjian <bruce (AT) momjian (DOT) us> writes: Actually, the 8.0.X libpq function would still report 70401 if connected to a 7.4.1 database, That was exactly the reason why the docs were written like that. Using two examples that are both from the same major release doesn't seem to me to be an improvement. Actually, the problem with 8.0.X is that the major version number had a zero in it. 8.1 does not, so I think it is actually better to use the same major version number in both examples. |
#6
| |||
| |||
|
|
Bruce Momjian <bruce (AT) momjian (DOT) us> writes: Tom Lane wrote: Bruce Momjian <bruce (AT) momjian (DOT) us> writes: Actually, the 8.0.X libpq function would still report 70401 if connected to a 7.4.1 database, That was exactly the reason why the docs were written like that. Using two examples that are both from the same major release doesn't seem to me to be an improvement. Actually, the problem with 8.0.X is that the major version number had a zero in it. 8.1 does not, so I think it is actually better to use the same major version number in both examples. You're ignoring the point at hand, which is exactly that the libpq function will work when connected to servers older (in fact much older) than it is. |
![]() |
| Thread Tools | |
| Display Modes | |
| |