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

Re: Tsearch strange error

From: silly_sad <sad(at)bankir(dot)ru>
To:
Cc: pgsql-ru-general(at)postgresql(dot)org
Subject: Re: Tsearch strange error
Date: 2007-03-21 07:59:25
Message-ID: 4600E5DD.4070202@bankir.ru (view raw or flat)
Thread:
Lists: pgsql-ru-general
> так вопросы не задают. Что мне гадать, какая у тебя кодировка
> в базе, откуда ты ispell взял ? Я могу только догадываться,
> что кодировка у тебя utf-8, а ispell английский ты не сконвертировал
> в utf-8.

и вот ещё эта информация будет полезной:

SELECT * from pg_ts_cfg;

     ts_name     | prs_name |    locale
-----------------+----------+--------------
 default         | default  | C
 utf8_russian    | default  | ru_RU.UTF-8
 simple          | default  |
 default_russian | default  | ru_RU.KOI8-R

инициализировано это было так

INSERT INTO pg_ts_dict
	(SELECT 'ru_ispell',
		dict_init,
		'DictFile="/usr/local/cms1/sql/russian.dict",'
		'AffFile="/usr/local/cms1/sql/russian.aff",'
		'StopFile="/usr/local/cms1/sql/russian.stop"',
		dict_lexize
	FROM pg_ts_dict
	WHERE dict_name = 'ispell_template');

UPDATE pg_ts_cfg SET locale = 'ru_RU.KOI8-R' WHERE ts_name =
'default_russian';

DELETE FROM pg_ts_cfgmap WHERE ts_name = 'default_russian';
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lhword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lpart_hword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'url', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'host', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'sfloat', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'uri', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'int', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'float', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'email', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'word', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'hword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlpart_hword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'part_hword',
'{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlhword',
'{ru_ispell,ru_stem_koi8}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'file', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'uint', '{simple}');
INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'version', '{simple}');

Словари эти чудесно работали в 8.1.4

In response to

Responses

pgsql-ru-general by date

Next:From: silly_sadDate: 2007-03-21 08:20:16
Subject: Tsearch strange error (appendix)
Previous:From: silly_sadDate: 2007-03-21 07:50:49
Subject: Re: Tsearch strange error

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