mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +03:00
Allow using named with hold cursors in autocommit
This commit is contained in:
parent
c81522079e
commit
13b0852619
|
@ -478,7 +478,7 @@ psyco_curs_execute(cursorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
"can't call .execute() on named cursors more than once");
|
"can't call .execute() on named cursors more than once");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (self->conn->autocommit) {
|
if (self->conn->autocommit && !self->withhold) {
|
||||||
psyco_set_error(ProgrammingError, self,
|
psyco_set_error(ProgrammingError, self,
|
||||||
"can't use a named cursor outside of transactions");
|
"can't use a named cursor outside of transactions");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user