Ticket #10476: remove_unnecessary_test_v2.diff
File remove_unnecessary_test_v2.diff, 2.1 KB (added by , 15 years ago) |
---|
-
django/db/backends/postgresql_psycopg2/base.py
108 108 if self._version[0:2] < (8, 0): 109 109 # No savepoint support for earlier version of PostgreSQL. 110 110 self.features.uses_savepoints = False 111 if self.features.uses_autocommit: 112 if self._version[0:2] < (8, 2): 113 # FIXME: Needs extra code to do reliable model insert 114 # handling, so we forbid it for now. 115 from django.core.exceptions import ImproperlyConfigured 116 raise ImproperlyConfigured("You cannot use autocommit=True with PostgreSQL prior to 8.2 at the moment.") 117 else: 118 # FIXME: Eventually we're enable this by default for 119 # versions that support it, but, right now, that's hard to 120 # do without breaking other things (#10509). 121 self.features.can_return_id_from_insert = True 111 if self._version[0:2] >= (8, 2): 112 # FIXME: Eventually we'll enable this by default for 113 # versions that support it, but, right now, that's hard to 114 # do without breaking other things (#10509). 115 self.features.can_return_id_from_insert = True 122 116 return cursor 123 117 124 118 def _enter_transaction_management(self, managed): -
docs/topics/db/transactions.txt
283 283 284 284 .. versionadded:: 1.1 285 285 286 With PostgreSQL 8.2 or later, there is an advanced option to run PostgreSQL286 There is an advanced option to run PostgreSQL 287 287 with :ref:`database-level autocommit <ref-databases>`. If you use this option, 288 288 there is no constantly open transaction, so it is always possible to continue 289 289 after catching an exception. For example::