From: | peter pilsl <pilsl(at)goldfisch(dot)at> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: order by text-type : whitespaces ignored?? |
Date: | 2006-12-13 09:50:14 |
Message-ID: | 457FCCD6.3060000@goldfisch.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Huxton wrote:
> peter pilsl wrote:
>>
>> I just get my mind crossed here:
>>
>> I do a simple select with order on a text-type. In my opinion entries
>> with leading spaces should be either first (or maybe last) in the list.
>> But in my select the whitespace just seems to be ignored:
>
> That'll be down to your locale settings. You'll need to re-initdb to
> change them I'm afraid. It's locale=C that you want.
>
thnx - I cant mess up with my locale-setting cause I also need postgres to sort
proper german umlauts stored as unicode, which was a difficult task to set up
years ago. I had to use de_AT.UTF-8 to get what I want. If I change to locale=C
again, I'll sure run into my old problems again:
http://www.thescripts.com/forum/thread173467.html (you have participated in
that thread also - thnx a lot for your help !!)
/usr/local/pgsql8/bin/pg_controldata /data/postgres/postgres8 | grep LC
LC_COLLATE: de_AT.UTF-8
LC_CTYPE: de_AT.UTF-8
I just shipped around my current problem by sorting by replace(traeger,' ','0')
which of course is not very cool, cause it will end up strange as soon as other
entries have 0 in their text, but I cant think of anything else right now.
I still find correct sorting a difficult thing to do in postgres :)
thnx
peter
--
mag. peter pilsl - goldfisch.at
IT-Consulting
Tel: +43-650-3574035
Tel: +43-1-8900602
Fax: +43-1-8900602-15
skype: peter.pilsl
pilsl(at)goldfisch(dot)at
www.goldfisch.at
From | Date | Subject | |
---|---|---|---|
Next Message | Csaba Nagy | 2006-12-13 10:05:56 | Re: Online index builds |
Previous Message | Anton | 2006-12-13 09:10:58 | Re: index на таблицу с ~ 700 000 записей: чем занят постгрес??? |