Re: Locales and Encodings

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
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 14:28:26
Message-ID: 87ejg0flv9.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Martijn van Oosterhout" <kleptog(at)svana(dot)org> writes:

> People don't want the ICU or glibc data and there's no other source as
> readily available.
>
> Perhaps we should fix that problem, rather than making more
> workarounds.

Fix the problem by making ICU a smaller less complex dependency?
Or fix the problem that glibc isn't everyone's libc?

I think realistically we're basically waiting for strcoll_l to become
standardized by POSIX so we can depend on 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.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-10-12 14:32:22 Re: Locales and Encodings
Previous Message Dave Page 2007-10-12 14:26:00 Re: Locale + encoding combinations