diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-28 06:49:00 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-28 06:49:00 +0000 |
| commit | 21672c26bf4604e57de4b2a64ec92ef8de53b834 (patch) | |
| tree | d8dcb3c5d1286269de490b0276deb1b21818904f /django/db/backends/postgresql/base.py | |
| parent | 59607bb1c197d394edb54e0db04618cf5b31cefb (diff) | |
Fixed #8592 -- Fixed a bug in the way savepoint usage was disabled for
PostgreSQL < 8.0.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql/base.py')
| -rw-r--r-- | django/db/backends/postgresql/base.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 376d7ba2c8..ad271f2e38 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -117,11 +117,10 @@ class DatabaseWrapper(BaseDatabaseWrapper): if set_tz: cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) if not hasattr(self, '_version'): - version = get_version(cursor) - self.__class__._version = version - if version < (8, 0): - # No savepoint support for earlier version of PostgreSQL. - self.features.uses_savepoints = False + self.__class__._version = get_version(cursor) + if self._version < (8, 0): + # No savepoint support for earlier version of PostgreSQL. + self.features.uses_savepoints = False cursor.execute("SET client_encoding to 'UNICODE'") cursor = UnicodeCursorWrapper(cursor, 'utf-8') return cursor |
