diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-11 18:06:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-11 18:06:01 +0000 |
commit | f79fbb2bec3bf44c7b980f059ce0f0540b5f669f (patch) | |
tree | 66e64cfc2de1589be31bfbff5fb34b28f073e0c2 /doc/src | |
parent | b2d9fbeef24deb640f8eef90c83625464ecd3c46 (diff) | |
download | postgresql-f79fbb2bec3bf44c7b980f059ce0f0540b5f669f.tar.gz postgresql-f79fbb2bec3bf44c7b980f059ce0f0540b5f669f.zip |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/libpq.sgml | 20 |
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> |