Re: order by problem - Mailing list pgsql-sql

From Richard Huxton
Subject Re: order by problem
Date
Msg-id 41AEDA75.1@archonet.com
Whole thread Raw
In response to order by problem  (Simon Moses <ks_moses@yahoo.com>)
List pgsql-sql
Simon Moses wrote:
> dear sir,
> when i run a query with order by customer_name i am
> getting the following result(ex.).
> 
> AA
> A B
> AC
> 
> i want it to be
> 
> A B
> AA
> AB

Sorting is down to your locale (the LC_xxx configuration settings). This 
is set when you initdb your database. It looks to me like you want "C" 
sorting, so dump your database, re-initdb with --locale=C and restore 
the dump.

There's a whole chapter on localisation in the manuals. Make sure you 
are clear on the difference between encoding and locale.
--  Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: SET AUTOCOMMIT TO OFF
Next
From: Andrew - Supernews
Date:
Subject: Re: find the "missing" rows