aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/auto-handle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/auto-handle.cxx')
-rw-r--r--odb/pgsql/auto-handle.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/odb/pgsql/auto-handle.cxx b/odb/pgsql/auto-handle.cxx
new file mode 100644
index 0000000..08e3006
--- /dev/null
+++ b/odb/pgsql/auto-handle.cxx
@@ -0,0 +1,26 @@
+// file : odb/pgsql/auto-handle.cxx
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <libpq-fe.h>
+
+#include <odb/pgsql/auto-handle.hxx>
+
+namespace odb
+{
+ namespace pgsql
+ {
+ void handle_traits<PGconn>::
+ release (PGconn* h)
+ {
+ PQfinish (h);
+ }
+
+ void handle_traits<PGresult>::
+ release (PGresult* h)
+ {
+ PQclear (h);
+ }
+ }
+}