Re: Mac ordering with locales

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Mac ordering with locales
Date: 2008-02-21 18:49:52
Message-ID: 13833.1203619792@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"A.M." <agentm(at)themactionfaction(dot)com> writes:
> On Feb 21, 2008, at 12:01 PM, Tom Lane wrote:
>> It seems to be a deficiency in Apple's locale support. The second
>> message is interesting since it indicates that "smart" sorting is
>> available somewhere/somehow under OS X, but nobody here knows how
>> to get at it :-(

> The function is "CFStringCompareWithOptionsAndLocale()".

> http://developer.apple.com/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html#//apple_ref/c/func/CFStringCompareWithOptionsAndLocale

> It is obviously not a portable function (beyond the Core Foundation
> sources being open and available), so there may not be any interest
> in having this in PostgreSQL.

Hmm. In principle we could replace strcoll() with a wrapper around
this, using a src/port/ module. The real problem with this is that it's
new in Leopard, and thus not even adequately portable within the OSX
world.

> Also, which MacOS X version is under discussion here? Could the
> strcoll() bug have been fixed in Leopard?

I just checked sort(1) on 10.5.2, and it seems to still behave the same
as before, so nope they didn't change it.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2008-02-21 19:14:58 Re: Mac ordering with locales
Previous Message Greg Sabino Mullane 2008-02-21 18:39:36 Re: Disable Triggers