From 3227cc59511454d311e4dd8f9f5293b0f06664e9 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 30 Jul 2010 02:58:51 +0000 Subject: [PATCH] [1.2.X] Fixed #13773 -- Passed in the current connection in a call to db_type(). Thanks to Suor for the report and patch. Backport of r13451 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13453 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/postgresql/creation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py index af26d0b78f5fd..1a821afe07d95 100644 --- a/django/db/backends/postgresql/creation.py +++ b/django/db/backends/postgresql/creation.py @@ -63,7 +63,7 @@ def get_index_sql(index_name, opclass=''): # a second index that specifies their operator class, which is # needed when performing correct LIKE queries outside the # C locale. See #12234. - db_type = f.db_type() + db_type = f.db_type(connection=self.connection) if db_type.startswith('varchar'): output.append(get_index_sql('%s_%s_like' % (db_table, f.column), ' varchar_pattern_ops'))