Commit 21672c26 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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
parent 59607bb1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -117,9 +117,8 @@ 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):
                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'")
+4 −5
Original line number Diff line number Diff line
@@ -89,9 +89,8 @@ 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):
                self.__class__._version = get_version(cursor)
            if self._version < (8, 0):
                # No savepoint support for earlier version of PostgreSQL.
                self.features.uses_savepoints = False
        return cursor