summaryrefslogtreecommitdiff
path: root/django/core/db/backends/postgresql.py
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 21:29:48 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 21:29:48 +0000
commite27211a0deae2f1d402537f0ebb64ad4ccf6a4da (patch)
tree73ba55f337e0d5c6e4ed39474ab6132879cc3947 /django/core/db/backends/postgresql.py
parent9e724c25236b1e00a36a146e66b5deaa43d2af96 (diff)
parentcb45fd0ae20597306cd1f877efc99d9bd7cbee98 (diff)
i18n: merged to [1054] of trunkarchive/attic/i18n
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@1067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/db/backends/postgresql.py')
-rw-r--r--django/core/db/backends/postgresql.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py
index c922fd42f6..a1de11e3df 100644
--- a/django/core/db/backends/postgresql.py
+++ b/django/core/db/backends/postgresql.py
@@ -116,6 +116,11 @@ 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.