Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Дата
Msg-id 2557.1158949158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #1931: ILIKE and LIKE fails on Turkish locale  (Victor Snezhko <snezhko@indorsoft.ru>)
Ответы Re: BUG #1931: ILIKE and LIKE fails on Turkish locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #1931: ILIKE and LIKE fails on Turkish locale  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
Victor Snezhko <snezhko@indorsoft.ru> writes:
> My FreeBSD lists a whole heck of characters:

> character 0x85 is a space
> character 0xa0 is a space
> character 0xaa is alphabetical
> character 0xb5 is alphabetical
> character 0xba is alphabetical
> character 0xc0 is alphabetical
> ... 0xc1-0xfe is alphabetical
> character 0xff is alphabetical

Hm.  I'm still thinking that this behavior is wrong for UTF8 encoding,
but it would be reasonable in LATINn and related encodings, so we
probably ought to do something about it.

After further thought, it's not so much that we can't tolerate
locale-dependent behavior of isspace() in general, as that in this
particular case we are expecting it to match the scanner's idea
of a space: scan.l has

space            [ \t\n\r\f]

which obviously is not locale-aware.  I think we need convert_ident to
use a plpgsql_isspace() that accepts these and only these as spaces.
Any high-bit-set byte is part of an identifier according to scan.l's
rules, and convert_ident must have the same behavior regardless of locale.

There may be related risks in and around the other flex scanners
... will look.

            regards, tom lane

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

Предыдущее
От: Douglas Toltzman
Дата:
Сообщение: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale