Re: Sorting Issue

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Ozer, Pam" <pozer(at)automotive(dot)com>, emilu(at)encs(dot)concordia(dot)ca, pgsql-sql(at)postgresql(dot)org
Subject: Re: Sorting Issue
Date: 2011-05-10 17:56:56
Message-ID: BANLkTikp8mUyKn7wmBgrjDtimJZGY2CU4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, May 10, 2011 at 11:45 AM, Samuel Gendler
<sgendler(at)ideasculptor(dot)com> wrote:
>
>
> On Tue, May 10, 2011 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>> "Ozer, Pam" <pozer(at)automotive(dot)com> writes:
>> > Isn't this the English standard for collation?  Or is this a non-c
>> > locale as mentioned below?  Is there anyway around this?
>>
>> >        LC_COLLATE = 'en_US.utf8'
>>
>> en_US is probably using somebody's idea of "dictionary order", which
>> I believe includes ignoring spaces in the first pass.  You might be
>> happier using "C" collation.  Unfortunately that requires re-initdb'ing
>> your database (as of existing PG releases).
>
>
> ugh. So what's the initdb incantation necessary to sort the way I'd expect
> an alphabetic sort to happen?  I'm literally just in the process of bringing
> up a new project, so it's a perfect opportunity for me to get this set up
> correctly to begin with.  THe default on my system was definitely
> en_US.utf8.

initdb --locale=C

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Emi Lu 2011-05-10 20:16:34 Re: Dates and NULL's`
Previous Message Lew 2011-05-10 17:55:35 Re: Dates and NULL's`