full text search, utf8

From: alexander lunyov <lan(at)zato(dot)ru>
To: pgsql-ru-general(at)postgresql(dot)org
Subject: full text search, utf8
Date: 2009-06-03 09:29:27
Message-ID: 4A264277.40201@zato.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ru-general

Здравствуйте.

Имеется freebsd 6.2, postgresql-8.3.1

В env:

% env | grep UTF
LANG=ru_RU.UTF-8
MM_CHARSET=UTF-8

% psql ports -U pgsql
Welcome to psql 8.3.1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

ports=# \encoding
UTF8
ports=# \l
Список баз данных
Имя | Владелец | Кодировка
-----------+----------+-----------
ports | pgsql | UTF8
postgres | pgsql | UTF8
template0 | pgsql | UTF8
template1 | pgsql | UTF8
(4 rows)

Пробую поискать в таблице, и вот результат:

ports=# select name from abonents where to_tsvector(name) @@
to_tsquery('s');
ERROR: неверная последовательность байт имя кодировки "UTF8": 0xd1
ПОДСКАЗКА: This error can also happen if the byte sequence does not
match the encoding expected by the server, which is controlled by
"client_encoding".

при этом в конфигурации english работает нормально.

# select count(name) from abonents where to_tsvector('english',name) @@
to_tsquery('some');
count
-------
6
(1 запись)

Почему?

--
alexander lunyov

Responses

Browse pgsql-ru-general by date

  From Date Subject
Next Message alexander lunyov 2009-06-03 11:56:59 Re: full text search, utf8
Previous Message sad@bankir.ru 2009-05-25 06:17:11 Re: postgresql-8.3.7 для 1с