Re: order by different on mac vs linux - Mailing list pgsql-sql

From Wes James
Subject Re: order by different on mac vs linux
Date
Msg-id CAFjCMHvK0RJ=f-PYtmkvssGsPxVHtFE6qRWfqWHkjV0e7=fP1A@mail.gmail.com
Whole thread Raw
In response to Re: order by different on mac vs linux  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Mon, May 14, 2012 at 5:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Wes James <comptekki@gmail.com> writes:
> Why is there a different order on the different platforms.

This is not exactly unusual.  You should first check to see if
lc_collate is set differently in the two installations --- but even if
it's the same, there are often platform-specific interpretations of
the sorting rules.  (Not to mention that OS X is flat out broken when
it comes to sorting UTF8 data ...)

If you want consistent cross-platform results, "C" locale will get
that for you, but it's pretty stupid about non-ASCII characters.

For more info read
http://www.postgresql.org/docs/9.1/static/charset.html

                       regards, tom lane

I did pg_dump of data, set LC_ALL=C, did initdb and createdb, pgsql -f pgdump.sql db, etc, and now it is sorting the way I'd expect and for the needs I have.

Thanks all for your responses.

-wes 

pgsql-sql by date:

Previous
From: chester c young
Date:
Subject: Re: possible bug in psql
Next
From: Peter Eisentraut
Date:
Subject: Re: order by different on mac vs linux