diff options
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r-- | django/db/backends/postgresql_psycopg2/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py index cc78ffe449..723453c9c5 100644 --- a/django/db/backends/postgresql_psycopg2/operations.py +++ b/django/db/backends/postgresql_psycopg2/operations.py @@ -98,6 +98,11 @@ class DatabaseOperations(BaseDatabaseOperations): return name # Quoting once is enough. return '"%s"' % name + def quote_parameter(self, value): + # Inner import so backend fails nicely if it's not present + import psycopg2 + return psycopg2.extensions.adapt(value) + def set_time_zone_sql(self): return "SET TIME ZONE %s" |