Re: little correction - Mailing list pgsql-hackers

From Tom Lane
Subject Re: little correction
Date
Msg-id 4027.1197527793@sss.pgh.pa.us
Whole thread Raw
In response to little correction  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Oleg Bartunov <oleg@sai.msu.su> writes:
> in 
> http://www.postgresql.org/docs/8.3/static/textsearch-dictionaries.html#TEXTSEARCH-THESAURUS
> I think 
> ALTER TEXT SEARCH CONFIGURATION russian
>      ADD MAPPING FOR asciiword, asciihword, hword_asciipart WITH thesaurus_simple;
> should be 
> ALTER TEXT SEARCH CONFIGURATION russian
>      ALTER MAPPING FOR asciiword, asciihword, hword_asciipart WITH thesaurus_simple;
> since configuration russian already exists.

Done.  I notice that if you try to do it the other way, you get:

regression=# ALTER TEXT SEARCH CONFIGURATION russian    ADD MAPPING FOR asciiword, asciihword, hword_asciipart WITH
simple;
ERROR:  duplicate key value violates unique constraint "pg_ts_config_map_index"

This is not very good --- we usually try to provide a more friendly
error message than "unique constraint violation" for duplicate system
catalog entries.  Not sure how hard it is to fix.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: [DOCS] "distributed checkpoint"
Next
From: "Magnus Hagander"
Date:
Subject: Re: [DOCS] "distributed checkpoint"