Re: problem with tsearch and utf-8 on postgresql 8.1

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Ottavio Campana" <ottavio(at)campana(dot)vi(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problem with tsearch and utf-8 on postgresql 8.1
Date: 2008-04-17 17:08:27
Message-ID: 162867790804171008m354c336cgdb89fa5058b608bd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

UTF8 is supported from 8.2 version

Regards
Pavel Stehule

On 17/04/2008, Ottavio Campana <ottavio(at)campana(dot)vi(dot)it> wrote:
> I created a database with locale it_IT(at)UTF-8, and I'm facing a weird problem
> with tsearch. Let me show it:
>
> tmptest=# SELECT * from pg_ts_cfg;
> ts_name | prs_name | locale
> -----------------+----------+--------------
> default_russian | default | ru_RU.KOI8-R
> simple | default |
> default | default | it_IT(at)UTF-8
> (3 righe)
>
> tmptest=# SELECT to_tsvector ('ciao mamma');
> ERROR: could not find tsearch config by locale
> tmptest=# UPDATE pg_ts_cfg set locale = 'it_IT(at)euro' where ts_name =
> 'default';
> UPDATE 1
> tmptest=# SELECT to_tsvector ('ciao mamma');
> to_tsvector
> --------------------
> 'ciao':1 'mamma':2
> (1 riga)
>
> tmptest=# UPDATE pg_ts_cfg set locale = 'it_IT(at)UTF-8' where ts_name =
> 'default';
> UPDATE 1
> tmptest=# SELECT to_tsvector ('ciao mamma');
> to_tsvector
> --------------------
> 'ciao':1 'mamma':2
> (1 riga)
>
> tmptest=# \q
>
> So at first tsearch does not work. If I change it to it_IT(at)euro it works
> and if I switch back to it_IT(at)UTF-8 it then works even with that locale.
> I cannot understand the reason why it happens. By disconnecting from the db
> and connecting again the problem is still there. Do you have any idea why it
> happens?
>
> I don't know if it matters, on the systems I have LANG="it_IT(at)euro" and
> LANGUAGE="it_IT"
>
> Thanks,
>
> Ottavio
>
> PS: Im running a backport of postgresql 8.1 on debian sarge.
>
> --
> Non c'e' piu' forza nella normalita', c'e' solo monotonia.
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2008-04-17 17:25:18 Re: table as log (multiple writers and readers)
Previous Message Tom Lane 2008-04-17 16:44:33 Re: Using meta-data for foreign key?