Search Postgresql Archives

Re: Ordering in SELECT statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 26, 2007, at 14:41 , kdealba@xxxxxxxx wrote:
and what I need is the following ("old fashion", that is, the "SPACE" is another character whose ASCII value is before any other LATIN letter's!!)
AB  CD
AB  EF
ABAB
ABD  E
Sorting is defined by the locale settings of your computer. I get the order you're looking for, and the my computer has LC_COLLATE="C".

$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"

# select * from sorts order by sort;
sort
-------
AB CD
AB EF
ABAB
ABD E
(4 rows)

I haven't had any experience setting the locale on my computer, but that might be something you want to look into.

Michael Glaesemann
grzm seespotcode net




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux