mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Add PQserverVersion() to libpq to provide more-convenient access to
the server version number. This commit also removes bogus DOS line endings from libpqddll.def. Greg Sabino Mullane
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.278 2004/07/12 14:23:28 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.279 2004/08/11 18:06:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2872,6 +2872,16 @@ PQprotocolVersion(const PGconn *conn)
|
||||
return PG_PROTOCOL_MAJOR(conn->pversion);
|
||||
}
|
||||
|
||||
int
|
||||
PQserverVersion(const PGconn *conn)
|
||||
{
|
||||
if (!conn)
|
||||
return 0;
|
||||
if (conn->status == CONNECTION_BAD)
|
||||
return 0;
|
||||
return conn->sversion;
|
||||
}
|
||||
|
||||
char *
|
||||
PQerrorMessage(const PGconn *conn)
|
||||
{
|
||||
|
Reference in New Issue
Block a user