Search Postgresql Archives

Re: C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 2, 2012 at 10:08 PM, Peter Eisentraut <peter_e@xxxxxxx> wrote:
> On Wed, 2012-08-29 at 10:31 -0700, Aleksey Tsalolikhin wrote:
>> What is the difference between C and en_US.UTF8, please?
>
> There are many differences, but here is a simple one:
>
> $ (echo a; echo A; echo b; echo B) | LC_ALL=C sort
> ...
> $ (echo a; echo A; echo b; echo B) | LC_ALL=en_US.utf8 sort
> ...

Beautifully illustrated, and in a language I readily understand as a UNIX
sys admin.  Thank you, Peter!

Thank you, Bruce, Merlin, and everybody else who replied.

I love the flexibility 9.1 allows to have a default sort locale with ability
to alter locale per-query if needed.  It gives us the confidence to move forward
with switching to C for sorting -- right now we only need to sort on US
English data, so this is a perfect fit.  When we internationalize, 9.1
allows us to switch back to UTF8-based sorting if needed.  I love it!

Thank you!
Aleksey


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux