1
0
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:
Tom Lane
2004-08-11 18:06:01 +00:00
parent b2d9fbeef2
commit f79fbb2bec
6 changed files with 154 additions and 118 deletions

View File

@ -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)
{