Ticket #12180: 12180-2.diff
File 12180-2.diff, 1.3 KB (added by , 15 years ago) |
---|
-
django/db/backends/postgresql_psycopg2/base.py
67 67 autocommit = self.settings_dict["DATABASE_OPTIONS"].get('autocommit', False) 68 68 self.features.uses_autocommit = autocommit 69 69 self._set_isolation_level(int(not autocommit)) 70 self.features.can_return_id_from_insert = autocommit 70 71 self.ops = DatabaseOperations() 71 72 self.client = DatabaseClient(self) 72 73 self.creation = DatabaseCreation(self) … … 114 115 # handling, so we forbid it for now. 115 116 from django.core.exceptions import ImproperlyConfigured 116 117 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 for119 # versions that support it, but, right now, that's hard to120 # do without breaking other things (#10509).121 self.features.can_return_id_from_insert = True122 118 return cursor 123 119 124 120 def _enter_transaction_management(self, managed):