diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-07-08 10:39:54 +1000 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-07-08 10:39:54 +1000 |
commit | 03d9566e0df45c72bffa99fe244a92f0279da56f (patch) | |
tree | b4c9cc9260769d7f79f62c0fe16a2c5a5746e6ed /django/db/backends/postgresql_psycopg2/operations.py | |
parent | 0b69a755029f8a8ba6005b9d77be8132a7bc0fb3 (diff) | |
download | django-03d9566e0df45c72bffa99fe244a92f0279da56f.tar.gz |
A large number of stylistic cleanups across django/db/
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r-- | django/db/backends/postgresql_psycopg2/operations.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py index c5aab84693..cc78ffe449 100644 --- a/django/db/backends/postgresql_psycopg2/operations.py +++ b/django/db/backends/postgresql_psycopg2/operations.py @@ -135,7 +135,7 @@ class DatabaseOperations(BaseDatabaseOperations): # This will be the case if it's an m2m using an autogenerated # intermediate table (see BaseDatabaseIntrospection.sequence_list) column_name = 'id' - sql.append("%s setval(pg_get_serial_sequence('%s','%s'), 1, false);" % \ + sql.append("%s setval(pg_get_serial_sequence('%s','%s'), 1, false);" % (style.SQL_KEYWORD('SELECT'), style.SQL_TABLE(self.quote_name(table_name)), style.SQL_FIELD(column_name)) @@ -161,7 +161,7 @@ class DatabaseOperations(BaseDatabaseOperations): for f in model._meta.local_fields: if isinstance(f, models.AutoField): - output.append("%s setval(pg_get_serial_sequence('%s','%s'), coalesce(max(%s), 1), max(%s) %s null) %s %s;" % \ + output.append("%s setval(pg_get_serial_sequence('%s','%s'), coalesce(max(%s), 1), max(%s) %s null) %s %s;" % (style.SQL_KEYWORD('SELECT'), style.SQL_TABLE(qn(model._meta.db_table)), style.SQL_FIELD(f.column), @@ -173,7 +173,7 @@ class DatabaseOperations(BaseDatabaseOperations): break # Only one AutoField is allowed per model, so don't bother continuing. for f in model._meta.many_to_many: if not f.rel.through: - output.append("%s setval(pg_get_serial_sequence('%s','%s'), coalesce(max(%s), 1), max(%s) %s null) %s %s;" % \ + output.append("%s setval(pg_get_serial_sequence('%s','%s'), coalesce(max(%s), 1), max(%s) %s null) %s %s;" % (style.SQL_KEYWORD('SELECT'), style.SQL_TABLE(qn(f.m2m_db_table())), style.SQL_FIELD('id'), |