pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oleg Bartunov <oleg@sai.msu.su>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: tsearch filenames unlikes special symbols and numbers
Date: Sun, 02 Sep 2007 18:46:11 -0400
Message-ID: <18259.1188773171@sss.pgh.pa.us> (raw)
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>

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 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
(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



view thread (31+ messages)  latest in thread

Message-ID: <18259.1188773171@sss.pgh.pa.us>
Permalink:  ../18259.1188773171@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18259.1188773171@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, oleg@sai.msu.su, pavel.stehule@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: tsearch filenames unlikes special symbols and numbers
  In-Reply-To: <18259.1188773171@sss.pgh.pa.us>

* 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