diff --git a/dibi/drivers/postgre.php b/dibi/drivers/postgre.php index 6e2a2bfd..99d6f657 100644 --- a/dibi/drivers/postgre.php +++ b/dibi/drivers/postgre.php @@ -208,6 +208,17 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiReflecto + /** + * Is in transaction? + * @return bool + */ + public function inTransaction() + { + return !in_array(pg_transaction_status($this->connection), array(PGSQL_TRANSACTION_UNKNOWN, PGSQL_TRANSACTION_IDLE), TRUE); + } + + + /** * Returns the connection resource. * @return mixed