Re: Tsearch + polish ispell + polish locale

From: <arkadiusz(dot)staron(at)dreamlab(dot)pl>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tsearch + polish ispell + polish locale
Date: 2006-11-22 09:03:46
Message-ID: EA6A3F5C1E4BC14D91D93A344436440C010D330F@MXMBON01.grupa.onet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> > I do not know how, but in some strange, random cases function isalpha()
> stops return true value for polish letters, and that is when RS_compile()
> returns error.
> Hmm, very strange. Which OS do you use?
> Pls, show exact
> # show lc_ctype;
> # show lc_collate;
> and tsearch2 configuration

Linux 2.6.14.4-dl380

lc_ctype
----------------
pl_PL.iso88592

lc_collate
----------------
pl_PL.iso88592

The other interesting thing is that, although tolower() and isalpha() functionality is broken, sorting polish letters works fine ...

Tsearch2 is configured as follows:

INSERT INTO pg_ts_cfg (...) VALUES ('default_polish', 'default', 'pl_PL');

INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'url', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'host', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'sfloat', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'uri', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'int', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'float', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'email', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'word', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'hword', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'nlword', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'nlpart_hword', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'part_hword', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'nlhword', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'file', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'uint', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'version', '{simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'lhword', '{pl_ispell,simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'lpart_hword','{pl_ispell,simple}');
INSERT INTO pg_ts_cfgmap (...) VALUES( 'default_polish', 'lword', '{pl_ispell,simple}');

INSERT INTO pg_ts_dict
(SELECT 'pl_ispell',
dict_init,
'DictFile="/home/astaron/lib/ispell/polish.dic",'
'AffFile="/home/astaron/lib/ispell/polish.aff",'
'StopFile="/home/astaron/lib/ispell/polish.stop"',
dict_lexize
FROM pg_ts_dict
WHERE dict_name = 'ispell_template');

If there is anything, I can do to help you to debug
this issue (logs, tests, code changes..), please let me know.

As for now I will run 8.2 and see if the problem persists ...

Best regards,
Arek.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-11-22 11:26:31 Re: Open source databases '60 per cent cheaper'
Previous Message Dr. Ernst Molitor 2006-11-22 08:33:11 PostgreSQL 8.2beta3 on Ubuntu 6.10 / AMD64