Re: Stripping white-space in SELECT statments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stripping white-space in SELECT statments
Дата
Msg-id 25711.1032445912@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stripping white-space in SELECT statments  (Thorbjörn Eriksson <thorbjorn.eriksson@ec.se>)
Ответы Re: Stripping white-space in SELECT statments
Список pgsql-sql
Thorbjörn Eriksson <thorbjorn.eriksson@ec.se> writes:
> I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> handles strings ending with space characters.

Perhaps you are running in a non-C locale?  A lot of locales have
sorting rules that are pretty weird about whitespace.

> The reason that we don't use 'LIKE 201901  %' is that it don't use
> the index

This suggests strongly that you are in a non-C locale.  Your external
software seems to be emulating the standard LIKE-to-index optimization;
which as you are now discovering, does not work with non-C sorting
rules (so the system doesn't try to apply it).
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Index usage on date feild , differences in '>' and '>='
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Stripping white-space in SELECT statments