mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-23 02:54:19 +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:
parent
7ed593504c
commit
ae67f353d2
2
NEWS
2
NEWS
|
@ -3,6 +3,8 @@ What's new in psycopg 2.4.7
|
||||||
|
|
||||||
- Work around `pip issue #1630 <https://github.com/pypa/pip/issues/1630>`__
|
- Work around `pip issue #1630 <https://github.com/pypa/pip/issues/1630>`__
|
||||||
making installation via ``pip -e git+url`` impossible (:ticket:`#18`).
|
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).
|
- Properly cleanup memory of broken connections (ticket #142).
|
||||||
- Fixed build on Solaris 10 and 11 where the round() function is already
|
- Fixed build on Solaris 10 and 11 where the round() function is already
|
||||||
declared (:ticket:`#146`).
|
declared (:ticket:`#146`).
|
||||||
|
|
|
@ -647,8 +647,6 @@ psyco_conn_set_client_encoding(connectionObject *self, PyObject *args)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_get_transaction_status(connectionObject *self, PyObject *args)
|
psyco_conn_get_transaction_status(connectionObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
|
||||||
|
|
||||||
return PyInt_FromLong((long)PQtransactionStatus(self->pgconn));
|
return PyInt_FromLong((long)PQtransactionStatus(self->pgconn));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user