aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 5b94442238a..402f77bd7d4 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -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">
@@ -894,6 +894,24 @@ only protocol 2.0. (Protocol 1.0 is obsolete and not supported by <application>
</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>
<term><function>PQerrorMessage</function><indexterm><primary>PQerrorMessage</></></term>
<listitem>