Re: [HACKERS] Bug in index scans with Locale support enabled

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Bug in index scans with Locale support enabled
Дата
Msg-id Pine.LNX.4.30.0012102300160.1095-100000@peter.localdomain
обсуждение исходный текст
Ответ на Bug in index scans with Locale support enabled  (Barry Lind <barry@xythos.com>)
Список pgsql-general
Barry Lind writes:

> The reason for this is that in the en_US locale all non-alphanumeric
> characters are ignored when doing string comparisons.  So the data above
> gets treated as:
> abc.xyz = abcxyz = abc/xyz  (as the non-alphanumeric characters of '.'
> and '/' are ignored).  This implys that the above query will then return
> all rows as the constant 'abc.' is the same as 'abc' for comparison
> purposes and all rows are >= 'abc'.
>
> Note that if you use a different locale for example en_UK, you will get
> different results as this locale does not ignore the . and / in the
> comparison.

The reason for that is that en_UK is not a valid locale name and will get
treated as the default "C" locale.  If you use en_GB you will get the same
behaviour as for en_US.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: overhead of "small" large objects
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: Re: Why PostgreSQL is not that popular as MySQL?