Comparing strings with non-ASCII characters

Поиск
Список
Период
Сортировка
От Artur Rataj
Тема Comparing strings with non-ASCII characters
Дата
Msg-id Pine.LNX.4.33.0211131251340.11103-100000@linux.iitis.gliwice.pl
обсуждение исходный текст
Ответы Re: Comparing strings with non-ASCII characters  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Comparing strings with non-ASCII characters  (Artur Rataj <arataj@iitis.gliwice.pl>)
Список pgsql-general
Hi,

Is it possible in Postgres to use non-ASCII characters and have enabled
index optimizations for the ~ operator? Would it work correctly with
locale set to C for expressions of the form ~ '^string.*'? Or is there a
way to substitue expressions like this with two comparisons? I have tried
to do it like that >= 'string' and <= 'string_' where _ would be a
character sorted after any other used in the searched table, but I did
not found such a character in the locale pl_PL. Anyway, why the index
optimizations are disabled for the ~ operator and not for the < or >
operators in the locale? Is not there a similar problem with all of the
three operators in a non-ASCII locale? Could not the lack of index
optimizations be fixed in Postgres for locales like pl_PL with a simple
reordering of characters for a collator, at least to get the < and >
operators working right with index optimizations in such locales?

Best regards,
Artur Rataj


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

Предыдущее
От: Adam Witney
Дата:
Сообщение: Re: Can not connect to the database ..oops
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Upgrade to dual processor machine?