From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | wstrzalka <wstrzalka(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is it bad sorting in UTF ?? |
Date: | 2009-04-14 12:10:40 |
Message-ID: | 49E47D40.5070704@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Huxton wrote:
> wstrzalka wrote:
>> Why PG sort's my data in case insensitive manner?
>
>> masterdb=# select name, setting from pg_settings WHERE name ilike 'lc
>> %';
>> name | setting
>> -------------+-------------
>> lc_collate | en_US.UTF-8
>
> Because that's what en_US.UTF-8 does. If you want "computer-style"
> sorting choose the "C" locale. You'll need to dump all your databases an
> re-initdb to do that I'm afraid. I believe 8.4 is going to allow
> different locales for each database though.
Even if it were slower, having a way to specify that sorting be WITH a
particular collation method/locale would be appealing.
I guess this could be done with a custom operator/opclass implementing
non-libc-based sorting and collation, which is probably where PostgreSQL
will land up heading in the end.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Kaarel Kitsemets | 2009-04-14 12:25:02 | Table dependencies |
Previous Message | Richard Huxton | 2009-04-14 11:57:18 | Re: Is it bad sorting in UTF ?? |