BUG #2261: ILIKE seems to be buggy on koi8 input

Поиск
Список
Период
Сортировка
От Evgeny Gridasov
Тема BUG #2261: ILIKE seems to be buggy on koi8 input
Дата
Msg-id 20060214173946.3661AF0B05@svr2.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2261: ILIKE seems to be buggy on koi8 input  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2261
Logged by:          Evgeny Gridasov
Email address:      eugrid@fpm.kubsu.ru
PostgreSQL version: 8.1.2
Operating system:   Debian Linux
Description:        ILIKE seems to be buggy on koi8 input
Details:

my terminal is RU_ru.KOI8-R,
template1's encoding is UTF8.
ILIKE seems to be buggy when comparing russian strings,
while UPPER/LOWER works OK.

template1=# \encoding koi8;

try to get uppercase of some russian letters:
template1=# select upper('фыва');
 upper
-------
 ФЫВА
(1 row)

result is OK!

next, try to compare uppercase and lowercase using
ILIKE:
template1=# select true where 'фыва' ilike 'ФЫВА';
 bool
------
(0 rows)

OOPS! Nothing happened. But why?

try the same but with latin charset letters:

template1=# select true where 'asdf' ilike 'ASDF';
 bool
------
 t
(1 row)

Try to compare lowercase with lowercase (russian):

template1=# select true where 'фыва' ilike 'фыва';
 bool
------
 t
(1 row)

it works.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andrew Klosterman
Дата:
Сообщение: Re: BUG #2246: Bad malloc interactions: ecpg, openssl
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2246: Bad malloc interactions: ecpg, openssl