summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-03 14:40:47 +0000
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-03 14:40:47 +0000
commitdbac3435cc16a398498db3ebad40603ae4e303ac (patch)
tree7eddac772ec2538225468e710d3d351343d7df39 /libpqpp/pq-connection.cpp
parentAdd missing PQ connection specific typedef (diff)
downloadlibdbpp-postgresql-dbac3435cc16a398498db3ebad40603ae4e303ac.tar.bz2
libdbpp-postgresql-dbac3435cc16a398498db3ebad40603ae4e303ac.tar.xz
libdbpp-postgresql-dbac3435cc16a398498db3ebad40603ae4e303ac.zip
Add function for retrieving server version number
Diffstat (limited to 'libpqpp/pq-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 590435e..21cbb5d 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -186,3 +186,9 @@ PQ::Connection::insertId()
return id;
}
+int
+PQ::Connection::serverVersion() const
+{
+ return PQserverVersion(conn);
+}
+