Re: tsearch filenames unlikes special symbols and numbers

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsearch filenames unlikes special symbols and numbers
Date: 2007-09-02 21:35:55
Message-ID: Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

I just tried on CVS HEAD and seems something is broken

postgres=# CREATE TEXT SEARCH DICTIONARY ru_ispell (
TEMPLATE = ispell,
DictFile = russian-utf8.dict,
AffFile = russian-utf8.aff,
StopWords = russian
);
ERROR: syntax error at or near "-"
LINE 3: DictFile = russian-utf8.dict,

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"

Honestly speaking, I have no time to follow constantly changed syntax,
but documentation
http://momjian.us/main/writings/pgsql/sgml/sql-createtsdictionary.html
doesn't make clear what's wrong.

Also, I'm wondering do we really need to show all schemas without
text search configurations defined ? Looks rather stranger.

postgres=# \dF
List of text search configurations
Schema | Name | Description
--------------------+------------+---------------------------------------
information_schema | |
pg_catalog | danish | Configuration for danish language
pg_catalog | dutch | Configuration for dutch language
pg_catalog | english | Configuration for english language
pg_catalog | finnish | Configuration for finnish language
pg_catalog | french | Configuration for french language
pg_catalog | german | Configuration for german language
pg_catalog | hungarian | Configuration for hungarian language
pg_catalog | italian | Configuration for italian language
pg_catalog | norwegian | Configuration for norwegian language
pg_catalog | portuguese | Configuration for portuguese language
pg_catalog | romanian | Configuration for romanian language
pg_catalog | russian | Configuration for russian language
pg_catalog | simple | simple configuration
pg_catalog | spanish | Configuration for spanish language
pg_catalog | swedish | Configuration for swedish language
pg_catalog | turkish | Configuration for turkish language
pg_temp_1 | |
pg_toast | |
pg_toast_temp_1 | |
public | |
(21 rows)

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

Include files in dictionary example are now in tsearch directory:

#include "tsearch/ts_locale.h"
#include "tsearch/ts_public.h"
#include "tsearch/ts_utils.h"

I didn't test parser example.

Oleg

PS. Sorry, I miss last syntax changes, but I really don't understand
parenthesis and commas usage in SQL. It's so strange.
I remember Peter raised an objections at the very beginning.

On Sun, 2 Sep 2007, Pavel Stehule wrote:

> Hello
> I am found small bug
> postgres=# CREATE TEXT SEARCH DICTIONARY cz1(TEMPLATE = ispell,DictFile= 'cs_czutf');ERROR: invalid text search configuration file name "cs_czutf"postgres=# CREATE TEXT SEARCH DICTIONARY cz1(TEMPLATE = ispell,DictFile= 'csczutf8');ERROR: invalid text search configuration file name "csczutf8"postgres=# CREATE TEXT SEARCH DICTIONARY cz1(TEMPLATE = ispell,DictFile= "csczutf8");ERROR: invalid text search configuration file name "csczutf8"postgres=# CREATE TEXT SEARCH DICTIONARY cz1(TEMPLATE = ispell,DictFile= "cs_czutf");ERROR: invalid text search configuration file name "cs_czutf"postgres=# CREATE TEXT SEARCH DICTIONARY cz1(TEMPLATE = ispell,DictFile= "csczutf");ERROR: could not open dictionary file"/usr/local/pgsql/share/tsearch_data/csczutf.dict": nen? souborem aniadres??em
> regardsPavel Stehule
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2007-09-02 22:46:11 Re: tsearch filenames unlikes special symbols and numbers
Previous Message Pavel Stehule 2007-09-02 20:28:20 tsearch filenames unlikes special symbols and numbers

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-02 22:46:11 Re: tsearch filenames unlikes special symbols and numbers
Previous Message Simon Riggs 2007-09-02 20:57:00 Re: synchronous_commit: Developer's View