diff options
| author | Robert Haas | 2024-09-09 15:54:55 +0000 |
|---|---|---|
| committer | Robert Haas | 2024-09-09 15:54:55 +0000 |
| commit | cdb6b0fdb0b2face270406905d31f8f513b015cc (patch) | |
| tree | 855c93a72bbe36872fa0f768a496f1749d030c75 /src/include | |
| parent | 5bbdfa8a18dc56d3e64aa723a68e02e897cb5ec3 (diff) | |
Add PQfullProtocolVersion() to surface the precise protocol version.
The existing function PQprotocolVersion() does not include the minor
version of the protocol. In preparation for pending work that will
bump that number for the first time, add a new function to provide it
to clients that may care, using the (major * 10000 + minor)
convention already used by PQserverVersion().
Jacob Champion based on earlier work by Jelte Fennema-Nio
Discussion: http://postgr.es/m/CAOYmi+mM8+6Swt1k7XsLcichJv8xdhPnuNv7-02zJWsezuDL+g@mail.gmail.com
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/libpq/pqcomm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 527735e3dba..6925f10602b 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -86,6 +86,7 @@ is_unixsock_path(const char *path) #define PG_PROTOCOL_MAJOR(v) ((v) >> 16) #define PG_PROTOCOL_MINOR(v) ((v) & 0x0000ffff) +#define PG_PROTOCOL_FULL(v) (PG_PROTOCOL_MAJOR(v) * 10000 + PG_PROTOCOL_MINOR(v)) #define PG_PROTOCOL(m,n) (((m) << 16) | (n)) /* |
