Re: order by problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: Simon Moses <ks_moses(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: order by problem
Date: 2004-12-02 09:03:49
Message-ID: 41AEDA75.1@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew - Supernews 2004-12-02 10:07:52 Re: find the "missing" rows
Previous Message Richard Huxton 2004-12-02 08:56:21 Re: SET AUTOCOMMIT TO OFF