Ensuring same collation on OSX and Linux?

From: John Norman <john(at)7fff(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Ensuring same collation on OSX and Linux?
Date: 2010-01-22 21:09:43
Message-ID: b6b8b6b71001221309m2977da98v214709256c8f6db3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I observe that with the apparently same locale settings on OSX and
Linux (stock Ubuntu 9.10), that the collations are different.

Here's my sample query:

select name from (
select 'A' as name
union
select 'a' as name
) tab
order by name asc

OSX: LC_COLLATE="en_US.UTF-8"
Result:

name
A
a

Linux: LC_COLLATE="en_US.UTF-8"

name
a
A

Also, I note that this is system-wide. If I sort a text file with
contents of A and a on separate lines . . . using /usr/bin/sort . . .
I get the same result.

Maybe the UTF8 collations on OSX (or Linux) are broken?

John

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-01-22 21:11:50 Re: Old/New
Previous Message Bob Pawley 2010-01-22 21:05:52 Re: Old/New