Re: How strings are sorted by LC_COLLATE specifically? - Mailing list pgsql-sql

From Chang Chao
Subject Re: How strings are sorted by LC_COLLATE specifically?
Date
Msg-id AANLkTinYeN1FdhtYqOBr34MxpDYz4qceHXK58Sc0Y1eC@mail.gmail.com
Whole thread Raw
In response to Re: How strings are sorted by LC_COLLATE specifically?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Hi Peter.

When I looked into the source(),came to know that strings are sorted like this.
 int result = strcoll(a, b); if (result == 0) {   result = strcmp(a,b); } return result;


On Wed, Dec 1, 2010 at 4:31 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On tor, 2010-11-25 at 14:42 +0900, Chang Chao wrote:
>> How strings are sorted when LC_COLLATE = ja_JP.UTF-8.
>> I tried to read the documention on that,but there are just a few
>> words,
>> like LC_COLLATE determines string sort order,
>> Is there a specific reference about this?
>> So I can implement an equivalent string sort function in JAVA.
>> because some of the sort logic is here.
>
> The actual string comparison is done by the strcoll() function in the
> operating system's C library.
>
>


pgsql-sql by date:

Previous
From: John Fabiani
Date:
Subject: Re: OT - load a shp file
Next
From: Jeff Bland
Date:
Subject: Re: DELETE WHERE EXISTS unexpected results