From 461633bacc4f1c47b50e67219a7c8ec0a16bad7d Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Thu, 9 Jun 2005 11:42:44 +0000 Subject: Bug 291803: PostgreSQL dies when you insert a string longer than 2700 characters into an indexed field Patch By Max Kanat-Alexander r=jouni, a=justdave --- Bugzilla/DB/Pg.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 86c5497cd..25378ccc3 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -197,4 +197,18 @@ sub bz_unlock_tables { } } +##################################################################### +# Custom Database Setup +##################################################################### + +sub bz_setup_database { + my $self = shift; + $self->SUPER::bz_setup_database(@_); + + # PostgreSQL doesn't like having *any* index on the thetext + # field, because it can't have index data longer than 2770 + # characters on that field. + $self->bz_drop_index('longdescs', 'longdescs_thetext_idx'); +} + 1; -- cgit v1.2.3-24-g4f1b