aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/pgsql/statement.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/odb/pgsql/statement.cxx b/odb/pgsql/statement.cxx
index 094aa40..cf3e181 100644
--- a/odb/pgsql/statement.cxx
+++ b/odb/pgsql/statement.cxx
@@ -66,23 +66,23 @@ namespace odb
void statement::
deallocate ()
{
- if (deallocated_)
- return;
-
+ if (!deallocated_)
{
- odb::tracer* t;
- if ((t = conn_.transaction_tracer ()) ||
- (t = conn_.tracer ()) ||
- (t = conn_.database ().tracer ()))
- t->deallocate (conn_, *this);
- }
+ {
+ odb::tracer* t;
+ if ((t = conn_.transaction_tracer ()) ||
+ (t = conn_.tracer ()) ||
+ (t = conn_.database ().tracer ()))
+ t->deallocate (conn_, *this);
+ }
- string s ("deallocate \"");
- s += name_;
- s += "\"";
+ string s ("deallocate \"");
+ s += name_;
+ s += "\"";
- auto_handle<PGresult> h (PQexec (conn_.handle (), s.c_str ()));
- deallocated_ = true;
+ auto_handle<PGresult> h (PQexec (conn_.handle (), s.c_str ()));
+ deallocated_ = true;
+ }
}
statement::