Re: Strange results of ORDER BY clause when item begins

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: SCassidy(at)overlandstorage(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange results of ORDER BY clause when item begins
Date: 2005-01-19 21:36:55
Message-ID: 1106170615.22416.6.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2005-01-19 at 11:24 -0800, SCassidy(at)overlandstorage(dot)com wrote:
> [non-word character being ignored by ORDER BY]
...
> testdb1=> show LC_COLLATE;
> lc_collate
> -------------
> en_US.UTF-8
> (1 row)

this is a 'feature' of your en_US locale:

bash$ export LC_COLLATE=en_US
bash$ (echo "usra";echo "usrq";echo "/usr/lib")| sort
usra
/usr/lib
usrq
bash$ export LC_COLLATE=C
bash$ (echo "usra";echo "usrq";echo "/usr/lib")| sort
/usr/lib
usra
usrq

maybe you should have run initdb with LC_COLLATE=C

gnari

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2005-01-19 22:01:08 Re: need an advice on running Database
Previous Message Vanole, Mike 2005-01-19 21:34:25 Calculating a moving average