Re: [HACKERS] Bug in index scans with Locale support enabled - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: [HACKERS] Bug in index scans with Locale support enabled
Date
Msg-id Pine.LNX.4.30.0012102300160.1095-100000@peter.localdomain
Whole thread Raw
In response to Bug in index scans with Locale support enabled  (Barry Lind <barry@xythos.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: overhead of "small" large objects
Next
From: Bruce Momjian
Date:
Subject: Re: Re: Re: Why PostgreSQL is not that popular as MySQL?