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
[EMAIL PROTECTED]
www.goldfisch.at

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to