]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 285705: [PostgreSQL] Index on some text columns on Postgres could use LOWER
authormkanat%kerio.com <>
Sun, 4 Sep 2005 15:12:37 +0000 (15:12 +0000)
committermkanat%kerio.com <>
Sun, 4 Sep 2005 15:12:37 +0000 (15:12 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=joel, a=justdave

Bugzilla/DB/Pg.pm

index f0c18b728a9e50a9d31afabf72639ee4b55cf99e..ff1e6abae36693ae14d40f48b1a523e3ad5e968e 100644 (file)
@@ -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'});
 }
 
 #####################################################################