Re: Sort order is different on Windows and Linux

From: "Robert Wille" <a2om6sy02(at)sneakemail(dot)com>
To: "Stephan Szabo sszabo-at-megazone(dot)bigpanda(dot)com |postgres users' group|" <9pr6hldt600t(at)sneakemail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sort order is different on Windows and Linux
Date: 2003-09-18 00:47:30
Message-ID: 009e01c37d7e$73edc720$2664a8c0@zucchini
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Do I simply "export LC_COLLATE=C" before I initdb, or do I pass it as a
parameter?

> On Wed, 17 Sep 2003, Robert Wille wrote:
>
> > I have found that the sort order is different on Windows and Linux (same
> > version of Postgres). On Windows, it sorts in what appears to be normal
> > ASCII order. On Linux, lowercase comes before uppercase, and all
> > non-alphanumerics appear to come before all alphanumerics. I really need
> > it to sort on Linux the same as it does on Windows. The docs seem to
> > imply that I can simply set the LANG environment variable to C to get an
> > ASCII sort order, but that seem to make a difference. How do I change
> > the sort order?
>
> You need to have the database initdb'd with the appropriate collation set
> in LC_COLLATE. Changing LANG/LC_COLLATE after the fact won't help (in
> recent versions anyway).
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2003-09-18 03:44:42 Re: High-volume shop uses PostgreSQL
Previous Message Joshua Moore-Oliva 2003-09-17 23:42:47 Re: Problems requiring a GROUP BY clause on update?