diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 24a4422b12..ef39fa9867 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -76,7 +76,7 @@ class UnicodeCursorWrapper(object): return getattr(self.cursor, attr) def __iter__(self): - return iter(self.cursor) + return iter(self.cursor.fetchall()) class DatabaseFeatures(BaseDatabaseFeatures): uses_savepoints = True