Changes between Initial Version and Version 3 of Ticket #29760
- Timestamp:
- Sep 17, 2018, 3:26:37 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29760
- Property Summary Cursors are closing explicitly in autocommit mode → Cursors are being closed explicitly in autocommit mode
- Property Version 2.1 → 1.11
-
Ticket #29760 – Description
initial v3 25 25 According to [http://initd.org/psycopg/docs/usage.html#server-side-cursors psycopg documentation], server-side cursors should not be closed explicitly if it is in autocommit mode. 26 26 27 According to [https://docs.djangoproject.com/en/ 2.1/topics/db/transactions/#autocommit Django documentation], Django sets autocommit mode true in default settings.27 According to [https://docs.djangoproject.com/en/1.11/topics/db/transactions/#autocommit Django documentation], Django sets autocommit mode true in default settings. 28 28 29 29 Of course it is possible to set withhold setting to false. In this case, cursor.close() must be called at the end but otherwise, according to the documentation, it should not be called at all. So if I am not mistaken there should be a conditional statement before calling cursor.close().