Oleg Bartunov <oleg@sai.msu.su> writes:
> postgres=# CREATE TEXT SEARCH DICTIONARY ru_ispell (
> TEMPLATE = ispell,
> DictFile = 'russian-utf8.dict',
> AffFile = 'russian-utf8.aff',
> StopWords = russian
> );
> ERROR: invalid text search configuration file name "russian-utf8.dict"
I made it reject all but latin letters, which is the same restriction
that's in place for timezone set filenames. That might be overly
strong, but we definitely have to forbid "." and "/" (and "\" on
Windows). Do we want to restrict it to letters, digits, underscore?
Or does it need to be weaker than that?
> Also, I'm wondering do we really need to show all schemas without
> text search configurations defined ? Looks rather stranger.
Um ... I don't see that; I get
regression=# \dF List of text search configurations Schema | Name | Description
------------+------------+---------------------------------------pg_catalog | danish | Configuration for danish
languagepg_catalog| dutch | Configuration for dutch languagepg_catalog | english | Configuration for english
languagepg_catalog| finnish | Configuration for finnish languagepg_catalog | french | Configuration for french
languagepg_catalog| german | Configuration for german languagepg_catalog | hungarian | Configuration for hungarian
languagepg_catalog| italian | Configuration for italian languagepg_catalog | norwegian | Configuration for
norwegianlanguagepg_catalog | portuguese | Configuration for portuguese languagepg_catalog | romanian | Configuration
forromanian languagepg_catalog | russian | Configuration for russian languagepg_catalog | simple | simple
configurationpg_catalog| spanish | Configuration for spanish languagepg_catalog | swedish | Configuration for
swedishlanguagepg_catalog | turkish | Configuration for turkish language
(16 rows)
Are you sure you're using CVS-head psql?
> Another problem I see are broken examples of dictionary and parser in
> documentation:
> http://momjian.us/main/writings/pgsql/sgml/textsearch-rule-dictionary-example.html
> http://momjian.us/main/writings/pgsql/sgml/textsearch-parser-example.html
Yeah, I wanted to discuss that with you. Code examples in sgml docs are
a bad idea: they're impossible to use as actual templates, because of
all the weird markup changes, and there's no easy way to notice if
they're broken. It would be better to remove these from the docs and
set them up as contrib modules.
regards, tom lane