From: mkanat%kerio.com <> Date: Sun, 4 Sep 2005 15:14:14 +0000 (+0000) Subject: Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER X-Git-Tag: bugzilla-2.20~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b05de491a34d8cd2888aa3806ada77fc9b04075;p=thirdparty%2Fbugzilla.git Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER Patch By Max Kanat-Alexander r=joel, a=justdave --- diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index c8ff4221bf..84631e62b7 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -212,6 +212,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'}); } #####################################################################