aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/connection.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-15 17:47:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-15 17:47:20 +0200
commit5f24741c88cf4e86dc7c9f3d8dd967a4a7f04bcf (patch)
tree9efc82ead8b8fb3164021bc381f7c6fc54982217 /odb/pgsql/connection.hxx
parentf0e79d5807525024baafe9fd79057b65c153fb49 (diff)
Work around PostgreSQL transaction poisoning in schema version query
Note that this only works in 9.4+. For older versions the workaround is to "pre-call" database::schema_version() outside of any transaction.
Diffstat (limited to 'odb/pgsql/connection.hxx')
-rw-r--r--odb/pgsql/connection.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/odb/pgsql/connection.hxx b/odb/pgsql/connection.hxx
index 57837ee..316dfeb 100644
--- a/odb/pgsql/connection.hxx
+++ b/odb/pgsql/connection.hxx
@@ -115,6 +115,12 @@ namespace odb
return handle_;
}
+ // Server version as returned by PQserverVersion(), for example, 90200
+ // (9.2.0), 90201 (9.2.1), 100000 (10.0), 110001 (11.1).
+ //
+ int
+ server_version () const;
+
statement_cache_type&
statement_cache ()
{