From fdc37b4f074b2add66a569468f97431ba38ccd8d Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" Date: Sun, 4 Sep 2005 08:14:14 +0000 Subject: [PATCH] Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER Patch By Max Kanat-Alexander r=joel, a=justdave git-svn-id: svn://10.0.0.236/trunk@179618 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm b/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm index f0c18b728a9..ff1e6abae36 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm @@ -217,6 +217,11 @@ sub bz_setup_database { # field, because it can't have index data longer than 2770 # characters on that field. $self->bz_drop_index('longdescs', 'longdescs_thetext_idx'); + + # PostgreSQL also wants an index for calling LOWER on + # login_name, which we do with sql_istrcmp all over the place. + $self->bz_add_index('profiles', 'profiles_login_name_lower_idx', + {FIELDS => ['LOWER(login_name)'], TYPE => 'UNIQUE'}); } #####################################################################