summaryrefslogtreecommitdiff
path: root/src/backend/snowball
diff options
context:
space:
mode:
authorTom Lane2007-08-25 00:03:59 +0000
committerTom Lane2007-08-25 00:03:59 +0000
commit7351b5fa1781c3942d2d5ff2116d2d0ba882bd42 (patch)
tree8b27ff0f6ef15b271ffbe644d4a934462a80f900 /src/backend/snowball
parentb918bf86c65632a5716308d8a613f5538a770927 (diff)
Cleanup for some problems in tsearch patch:
- ispell initialization crashed on empty dictionary file - ispell initialization crashed on affix file with prefixes but no suffixes - stop words file was run through pg_verify_mbstr, with database encoding, but it's supposed to be UTF-8; similar bug for synonym files - bunch of comments added, typos fixed, and other cleanup Introduced consistent encoding checking/conversion of data read from tsearch configuration files, by doing this in a single t_readline() subroutine (replacing direct usages of fgets). Cleaned up API for readstopwords too. Heikki Linnakangas
Diffstat (limited to 'src/backend/snowball')
-rw-r--r--src/backend/snowball/dict_snowball.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/snowball/dict_snowball.c b/src/backend/snowball/dict_snowball.c
index 03f2dd928c..57aac234ed 100644
--- a/src/backend/snowball/dict_snowball.c
+++ b/src/backend/snowball/dict_snowball.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.2 2007/08/22 01:39:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.3 2007/08/25 00:03:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -192,7 +192,6 @@ dsnowball_init(PG_FUNCTION_ARGS)
ListCell *l;
d = (DictSnowball *) palloc0(sizeof(DictSnowball));
- d->stoplist.wordop = recode_and_lowerstr;
foreach(l, dictoptions)
{
@@ -204,8 +203,7 @@ dsnowball_init(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("multiple StopWords parameters")));
- readstoplist(defGetString(defel), &d->stoplist);
- sortstoplist(&d->stoplist);
+ readstoplist(defGetString(defel), &d->stoplist, lowerstr);
stoploaded = true;
}
else if (pg_strcasecmp("Language", defel->defname) == 0)