1
1
mirror of https://github.com/psycopg/psycopg2.git synced 2025-03-13 12:25:48 +03:00

Allow get_transaction_status on closed connections

It's a local operation and the libpq functions has a NULL guard.

Conflicts:

	NEWS
This commit is contained in:
Daniele Varrazzo 2014-03-06 17:49:24 +00:00
parent 7ed593504c
commit ae67f353d2
2 changed files with 2 additions and 2 deletions

2
NEWS
View File

@ -3,6 +3,8 @@ What's new in psycopg 2.4.7
- Work around `pip issue #1630 <https://github.com/pypa/pip/issues/1630>`__
making installation via ``pip -e git+url`` impossible (:ticket:`#18`).
- It is now possible to call `get_transaction_status()` on closed
connections.
- Properly cleanup memory of broken connections (ticket #142).
- Fixed build on Solaris 10 and 11 where the round() function is already
declared (:ticket:`#146`).

View File

@ -647,8 +647,6 @@ psyco_conn_set_client_encoding(connectionObject *self, PyObject *args)
static PyObject *
psyco_conn_get_transaction_status(connectionObject *self, PyObject *args)
{
EXC_IF_CONN_CLOSED(self);
return PyInt_FromLong((long)PQtransactionStatus(self->pgconn));
}