mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
* psycopg/pqpath.c (pq_execute): uncomment the "curs->pgres ==
NULL" error handler after the PQexec() call. This is needed to catch database disconnects (and probably other errors). According to Federico, it was commented out to avoid a spurious error, so we should watch for problems.
This commit is contained in:
parent
fd5d2d5238
commit
4910f53b7e
|
@ -1,3 +1,11 @@
|
|||
2007-12-20 James Henstridge <james@jamesh.id.au>
|
||||
|
||||
* psycopg/pqpath.c (pq_execute): uncomment the "curs->pgres ==
|
||||
NULL" error handler after the PQexec() call. This is needed to
|
||||
catch database disconnects (and probably other errors). According
|
||||
to Federico, it was commented out to avoid a spurious error, so we
|
||||
should watch for problems.
|
||||
|
||||
2007-12-20 James Henstridge <james@jamesh.id.au>
|
||||
|
||||
* psycopg/pqpath.c (pq_raise): only remove the first 8 characters
|
||||
|
|
|
@ -456,14 +456,13 @@ pq_execute(cursorObject *curs, const char *query, int async)
|
|||
curs->pgres = PQexec(curs->conn->pgconn, query);
|
||||
|
||||
/* dont let pgres = NULL go to pq_fetch() */
|
||||
/* if (curs->pgres == NULL) {
|
||||
if (curs->pgres == NULL) {
|
||||
pthread_mutex_unlock(&(curs->conn->lock));
|
||||
Py_BLOCK_THREADS;
|
||||
PyErr_SetString(OperationalError,
|
||||
PQerrorMessage(curs->conn->pgconn));
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
else if (async == 1) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user