From d4464fbaf93966c48c84fe2dc36e9fef34f79301 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sun, 4 Sep 2005 15:12:37 +0000 Subject: Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER Patch By Max Kanat-Alexander r=joel, a=justdave --- Bugzilla/DB/Pg.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index f0c18b728..ff1e6abae 100644 --- a/Bugzilla/DB/Pg.pm +++ b/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'}); } ##################################################################### -- cgit v1.2.3-24-g4f1b