Skip site navigation (1) Skip section navigation (2)

Bunch of tsearch fixes and cleanup

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Bunch of tsearch fixes and cleanup
Date: 2007-08-23 14:17:55
Message-ID: 46CD9713.6080107@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-patches
Fixes the following bugs:
- ispell initialization crashed on empty dictionary file
- ispell initialization crashed on affix file with prefixes but no suffixes
- stop words file was ran through pg_verify_mbstr, with database
encoding, but it's later interpreted as being UTF-8. Now verifies that
it's UTF-8, regardless of database encoding.

Other changes:

- readstopwords now sorts the stop words after loading them. Removed the
separate sortstopwords function.

- readstopwords calls recode_and_lowerstr directly, instead of using the
 "wordop" function pointer in StopList struct. All callers used
recode_and_lowerstr anyway, so this simplifies the code a little bit. Is
there any external dictionary implementations that would require
different behavior?

- bunch of comments added, typos fixed, and other cleanup

The code still needs lots of love, but it's a start...

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

Attachment: tsearch-fixes-1.patch
Description: text/x-diff (24.5 KB)

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2007-08-23 14:49:27
Subject: Re: Bunch of tsearch fixes and cleanup
Previous:From: Marko KreenDate: 2007-08-23 08:54:58
Subject: Re: BUG #3571: call to decrypt causes segfault

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group