Re: Ordering in SELECT statement - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Ordering in SELECT statement
Date
Msg-id 227DC931-2807-46E4-93BD-077C0A2BF630@seespotcode.net
Whole thread Raw
In response to Ordering in SELECT statement  ("kdealba@uaaan.mx" <kdealba@uaaan.mx>)
Responses Re: Ordering in SELECT statement  (PFC <lists@peufeu.com>)
List pgsql-general
On Jun 26, 2007, at 14:41 , kdealba@uaaan.mx 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



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Ordering in SELECT statement
Next
From: Michael Glaesemann
Date:
Subject: Re: upgrade 8.1.4 -> latest, sort order subquery