mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +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:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.157 2004/06/08 13:49:22 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.158 2004/08/11 18:06:00 tgl Exp $
|
||||
-->
|
||||
|
||||
<chapter id="libpq">
|
||||
@ -892,6 +892,24 @@ The 3.0 protocol will normally be used when communicating with
|
||||
only protocol 2.0. (Protocol 1.0 is obsolete and not supported by <application>libpq</application>.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><function>PQserverVersion</function><indexterm><primary>PQserverVersion</></></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Returns an integer representing the backend version.
|
||||
<synopsis>
|
||||
int PQserverVersion(const PGconn *conn);
|
||||
</synopsis>
|
||||
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 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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
Reference in New Issue
Block a user