+
+
+ PQlibVersion
+
+ PQserverVersion
+
+
+
+
+ Return the version of
libpq> that is being used.
+
+int PQlibVersion(void);
+
+
+
+ The result of this function can be used to determine, at
+ runtime, if specific functionality is available in the currently
+ loaded version of libpq. The function can be used, for example,
+ to determine which connection options are available for
+ PQconnectdb> or if the hex> bytea>
+ output added in PostgreSQL 9.0 is supported.
+
+
+ The number is formed by converting the major, minor, and revision
+ numbers into two-decimal-digit numbers and appending them together.
+ For example, version 9.1 will be returned as 90100, and version
+ 9.1.2 will be returned as 90102 (leading zeroes are not shown).
+
+
+
+ This function appeared in
PostgreSQL> version 9.1, so
+ it cannot be used to detect required functionality in earlier
+ versions, since linking to it will create a link dependency
+ on version 9.1.
+
+
+
+
+
time_t end_time);
static int pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time);
+/*
+ * PQlibVersion: return the libpq version number
+ */
+int
+PQlibVersion(void)
+{
+ return PG_VERSION_NUM;
+}
/*
* fputnbytes: print exactly N bytes to a file
/* === in fe-misc.c === */
+/* Get the version of the libpq library in use */
+extern int PQlibVersion(void);
+
/* Determine length of multibyte encoded char at *s */
extern int PQmblen(const char *s, int encoding);