Re: [COMMITTERS] How strings are sorted by LC_COLLATE specifically?

Lists: pgsql-committerspgsql-hackers
From: Chang Chao <charleschung(dot)cn(at)gmail(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: How strings are sorted by LC_COLLATE specifically?
Date: 2010-11-25 06:40:58
Message-ID: AANLkTik_8150_oSMgQwjaZG_99BPCUgZYhyVyUVqCNmf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Hello Dear All.

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.
Any clue will be greatly appreciated.

Charles


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Chang Chao <charleschung(dot)cn(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] How strings are sorted by LC_COLLATE specifically?
Date: 2010-11-25 19:25:37
Message-ID: AANLkTim5XGy8Kc7feW7_nAkTJpgQR4VEAOQCmUpptwqt@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Thu, Nov 25, 2010 at 1:40 AM, Chang Chao <charleschung(dot)cn(at)gmail(dot)com> 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.
> Any clue will be greatly appreciated.

As far as I know, we just inherit whatever behavior the operating
system has for that collation.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Chang Chao <charleschung(dot)cn(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] How strings are sorted by LC_COLLATE specifically?
Date: 2010-11-26 00:44:01
Message-ID: AANLkTimXaBcmoqhV+nfCXmDHx3nYbmarMx3XGvted2mT@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Hi,Robert.
Thanks for your reply.

As far as I looked into postgre's source,
I came to know that It seems that it uses strcoll to compare strings.
So it depends on the underlying operating system,like you said.

Charles.