Re: Locales and Encodings

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Locales and Encodings
Date: 2007-10-12 16:15:57
Message-ID: 20071012161557.GC23216@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 12, 2007 at 03:28:26PM +0100, Gregory Stark wrote:
> Fix the problem by making ICU a smaller less complex dependency?

How? It's 95% data, you can't reduce that. glibc also has 10MB of locale
data. That actual code is much smaller than postgres and doesn't depend
on any other non-system libraries.

> I think realistically we're basically waiting for strcoll_l to become
> standardized by POSIX so we can depend on it.

I think we could be waiting forever then. It's supported by Win32,
MacOSX and glibc. The systems that don't support it tend not to support
multibyte collation anyway. Patches have been created to use this and
rejected because not enough platforms support it...

> Personally I think we should just implement our own strcoll_l as a wrapper
> around setlocale-strcoll-setlocale and use strcoll_l if it's available and
> our, possibly slow, wrapper if not. If we ban direct use of strcoll and other
> lc_collate sensitive functions in Postgres we could also remember the last
> locale used and not do unnecessary setlocales so existing use cases aren't
> slowed down at all.

Been done also. As I recall it was *really* slow, not just a little
bit.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-10-12 16:22:18 Re: pg_tablespace_size()
Previous Message Andreas Pflug 2007-10-12 16:02:08 Re: Locales and Encodings