summaryrefslogtreecommitdiff
path: root/django/core/db/backends/postgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/db/backends/postgresql.py')
-rw-r--r--django/core/db/backends/postgresql.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py
index a1de11e3df..b6d34fc814 100644
--- a/django/core/db/backends/postgresql.py
+++ b/django/core/db/backends/postgresql.py
@@ -49,6 +49,11 @@ class DatabaseWrapper:
self.connection.close()
self.connection = None
+ def quote_name(self, name):
+ if name.startswith('"') and name.endswith('"'):
+ return name # Quoting once is enough.
+ return '"%s"' % name
+
def dictfetchone(cursor):
"Returns a row from the cursor as a dict"
return cursor.dictfetchone()
@@ -116,11 +121,6 @@ def get_relations(cursor, table_name):
continue
return relations
-def quote_name(name):
- if name.startswith('"') and name.endswith('"'):
- return name # Quoting once is enough.
- return '"%s"' % name
-
# Register these custom typecasts, because Django expects dates/times to be
# in Python's native (standard-library) datetime/time format, whereas psycopg
# use mx.DateTime by default.