mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Add PQlibVersion() function to libpq
This function is like the PQserverVersion() function except it returns the version of libpq, making it possible for a client program or driver to determine which version of libpq is in use at runtime, and not just at link time. Suggested by Harald Armin Massa and several others.
This commit is contained in:
@ -66,6 +66,14 @@ static int pqSocketCheck(PGconn *conn, int forRead, int forWrite,
|
||||
time_t end_time);
|
||||
static int pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time);
|
||||
|
||||
/*
|
||||
* PQlibVersion: return the libpq version number
|
||||
*/
|
||||
int
|
||||
PQlibVersion(void)
|
||||
{
|
||||
return PG_VERSION_NUM;
|
||||
}
|
||||
|
||||
/*
|
||||
* fputnbytes: print exactly N bytes to a file
|
||||
|
Reference in New Issue
Block a user