diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index faf5dd20db..85b2acb9d2 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -54,7 +54,7 @@ class UnicodeCursorWrapper(object): def execute(self, sql, params=()): try: - return self.cursor.execute(query, args) + return self.cursor.execute(sql, params) except Database.IntegrityError, e: raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2] except Database.DatabaseError, e: