summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-09-04 17:12:37 +0200
committermkanat%kerio.com <>2005-09-04 17:12:37 +0200
commitd4464fbaf93966c48c84fe2dc36e9fef34f79301 (patch)
treea1d8ba89782c657b32884ed20527f598a828c385 /Bugzilla
parent25ede8ea22c57d678b718fa6005a661ac31fc243 (diff)
downloadbugzilla-d4464fbaf93966c48c84fe2dc36e9fef34f79301.tar.gz
bugzilla-d4464fbaf93966c48c84fe2dc36e9fef34f79301.tar.xz
Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=joel, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Pg.pm5
1 files changed, 5 insertions, 0 deletions
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'});
}
#####################################################################