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