pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: tsearch filenames unlikes special symbols and numbers
Date: Mon, 3 Sep 2007 01:35:55 +0400 (MSD)
Message-ID: <Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru> (raw)
In-Reply-To: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com>
References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com>

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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83



view thread (31+ messages)  latest in thread

Message-ID: <Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru>
Permalink:  ../Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru/
Also on:    postgresql.org/message-id/Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-docs@postgresql.org
  Cc: oleg@sai.msu.su, pavel.stehule@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: tsearch filenames unlikes special symbols and numbers
  In-Reply-To: <Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru>
  References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com> <Pine.LNX.4.64.0709030113090.2767@sn.sai.msu.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox