Re: Patch for collation using ICU

From: "Palle Girgensohn" <girgen(at)pingpong(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Palle Girgensohn" <girgen(at)pingpong(dot)net>, "Tatsuo Ishii" <t-ishii(at)sra(dot)co(dot)jp>, john(at)geeknet(dot)com(dot)au, alvherre(at)dcc(dot)uchile(dot)cl, pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for collation using ICU
Date: 2005-05-08 22:31:26
Message-ID: 47900.62.148.39.163.1115591486.squirrel@62.148.39.163
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Palle Girgensohn <girgen(at)pingpong(dot)net> writes:
>>> I'm confused. I thought the ICU patches is intended for using on
>>> broken locale platforms?
>
>> It will sort correctly in *one* locale, using ICU. You still cannot mix
>> different locales in the same database cluster, the collation locale is
>> still fixed at initdb time, unfortunately.
>
> I thought the point of using ICU was to be able to dig out from under
> that restriction?

I think it might be quite possible to mix several locales, using ICU. It's
just that this is not what the patch does at moment. It just finds out the
locale set at initdb and uses it for collation with ICU.

Handling mixed locales for collation has a few hard problems, AFAIK.
First, isn't the main obstacle for mixing collations that indices require
a single well defined locale? I assume that locale dependant comparison
(collation) is used when indexing tuples, right? As long as a specific
locales collation is used for indexing text fields, I believe we cannot
easily mix different locales, right? Second, how do we tell the backend
which locale to use? Is there some SQL spec for this?

> It's a bit of a large pill to swallow if we will still
> have to throw it away someday to become SQL spec compliant.

What do we need to be SQL spec compliant in this respect?

/Palle

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-05-08 22:36:49 Re: lastval()
Previous Message Andrew Dunstan 2005-05-08 21:48:21 Re: pl/pgsql enabled by default