Re: Sorting problem - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Sorting problem
Date
Msg-id 20031014203640.V89503@megazone.bigpanda.com
Whole thread Raw
In response to Sorting problem  ("George A.J" <jinujosein@yahoo.com>)
List pgsql-sql
On Tue, 14 Oct 2003, George A.J wrote:

> hi all,
> i am using postgres 7.3.2 .i am converitng a mssql database to postgres.
> now i am facing a strange problem. sorting based on a varchar field is not working
> as expected. the non alphanumeric characters are not sorting based on the ascii
> value of them.

What OS and locale are you using?  If it's not "C", you're probably
getting bit by the fact that many natural language collations (such as
en_US for example) don't consider most of the symbols except as tie
breakers when sorting.  Unfortunately, to change the locale you need to
run initdb again with the appropriate locale, something like:
LANG="C" initdb -D /path/to/dataspace




pgsql-sql by date:

Previous
From: "George A.J"
Date:
Subject: Sorting problem
Next
From: Richard Huxton
Date:
Subject: Re: Create View