summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-13 06:23:30 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-13 06:23:30 +0000
commit28f66bb097799f34a6ead02fe4ecafa493cee06b (patch)
tree1a80e2849772c92b3fc840487848a5222ea4d1d0 /django/db
parentbc044651aaed9eedbc195414a71bde4e375a7c73 (diff)
downloaddjango-28f66bb097799f34a6ead02fe4ecafa493cee06b.tar.gz
unicode: Merged from trunk up to [5213].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db')
-rw-r--r--django/db/backends/postgresql/base.py4
-rw-r--r--django/db/backends/postgresql_psycopg2/base.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index 867ddd0148..ef0d06f6a1 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -233,7 +233,7 @@ def get_sql_sequence_reset(style, model_list):
if isinstance(f, models.AutoField):
output.append("%s setval('%s', (%s max(%s) %s %s));" % \
(style.SQL_KEYWORD('SELECT'),
- style.SQL_FIELD('%s_%s_seq' % (model._meta.db_table, f.column)),
+ style.SQL_FIELD(quote_name('%s_%s_seq' % (model._meta.db_table, f.column))),
style.SQL_KEYWORD('SELECT'),
style.SQL_FIELD(quote_name(f.column)),
style.SQL_KEYWORD('FROM'),
@@ -242,7 +242,7 @@ def get_sql_sequence_reset(style, model_list):
for f in model._meta.many_to_many:
output.append("%s setval('%s', (%s max(%s) %s %s));" % \
(style.SQL_KEYWORD('SELECT'),
- style.SQL_FIELD('%s_id_seq' % f.m2m_db_table()),
+ style.SQL_FIELD(quote_name('%s_id_seq' % f.m2m_db_table())),
style.SQL_KEYWORD('SELECT'),
style.SQL_FIELD(quote_name('id')),
style.SQL_KEYWORD('FROM'),
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
index ed810504dd..d9a850957c 100644
--- a/django/db/backends/postgresql_psycopg2/base.py
+++ b/django/db/backends/postgresql_psycopg2/base.py
@@ -184,7 +184,7 @@ def get_sql_sequence_reset(style, model_list):
if isinstance(f, models.AutoField):
output.append("%s setval('%s', (%s max(%s) %s %s));" % \
(style.SQL_KEYWORD('SELECT'),
- style.SQL_FIELD('%s_%s_seq' % (model._meta.db_table, f.column)),
+ style.SQL_FIELD(quote_name('%s_%s_seq' % (model._meta.db_table, f.column))),
style.SQL_KEYWORD('SELECT'),
style.SQL_FIELD(quote_name(f.column)),
style.SQL_KEYWORD('FROM'),
@@ -193,7 +193,7 @@ def get_sql_sequence_reset(style, model_list):
for f in model._meta.many_to_many:
output.append("%s setval('%s', (%s max(%s) %s %s));" % \
(style.SQL_KEYWORD('SELECT'),
- style.SQL_FIELD('%s_id_seq' % f.m2m_db_table()),
+ style.SQL_FIELD(quote_name('%s_id_seq' % f.m2m_db_table())),
style.SQL_KEYWORD('SELECT'),
style.SQL_FIELD(quote_name('id')),
style.SQL_KEYWORD('FROM'),