diff options
author | Russell Keith-Magee <russell@keith-magee.com> | 2010-06-10 11:45:29 +0000 |
---|---|---|
committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-06-10 11:45:29 +0000 |
commit | 2597f31ed4e9dff814809767e83209843bf9512e (patch) | |
tree | abbd2baec5836d6cd96d05f11538f3696658a5bf /django/db/backends/postgresql/creation.py | |
parent | ac8b7ff02133f3d9112574e3660fd5ad042bc751 (diff) | |
download | django-2597f31ed4e9dff814809767e83209843bf9512e.tar.gz |
Refs #8901 -- Reverted r13328 because the patch imposes a minimum version requirement of Postgres 8.0; we can't impose that on Django 1.2, so we need to wait until the 1.3 is branched before we can apply this change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql/creation.py')
-rw-r--r-- | django/db/backends/postgresql/creation.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py index e3587f0e37..af26d0b78f 100644 --- a/django/db/backends/postgresql/creation.py +++ b/django/db/backends/postgresql/creation.py @@ -1,5 +1,4 @@ from django.db.backends.creation import BaseDatabaseCreation -from django.db.backends.util import truncate_name class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column @@ -52,7 +51,7 @@ class DatabaseCreation(BaseDatabaseCreation): def get_index_sql(index_name, opclass=''): return (style.SQL_KEYWORD('CREATE INDEX') + ' ' + - style.SQL_TABLE(qn(truncate_name(index_name,self.connection.ops.max_name_length()))) + ' ' + + style.SQL_TABLE(qn(index_name)) + ' ' + style.SQL_KEYWORD('ON') + ' ' + style.SQL_TABLE(qn(db_table)) + ' ' + "(%s%s)" % (style.SQL_FIELD(qn(f.column)), opclass) + |