aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/connection.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-07 15:00:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-07 15:00:06 +0200
commit0e37272b9ab8f37ad2f3d37bf6a09c68e5117d02 (patch)
tree823c0bc76f6c03e9ecedaaad6db719a7b0367299 /odb/pgsql/connection.cxx
parent26f53799c911e44da5d229e8f6bf2c40f79c31b1 (diff)
Add support for SQL statement tracing
Diffstat (limited to 'odb/pgsql/connection.cxx')
-rw-r--r--odb/pgsql/connection.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/pgsql/connection.cxx b/odb/pgsql/connection.cxx
index 6f0feaf..b173136 100644
--- a/odb/pgsql/connection.cxx
+++ b/odb/pgsql/connection.cxx
@@ -86,6 +86,14 @@ namespace odb
//
string str (s, n);
+ {
+ odb::tracer* t;
+ if ((t = transaction_tracer ()) ||
+ (t = tracer ()) ||
+ (t = database ().tracer ()))
+ t->execute (*this, str.c_str ());
+ }
+
auto_handle<PGresult> h (PQexec (handle_, str.c_str ()));
unsigned long long count (0);