Re: Locales and Encodings - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Locales and Encodings
Date
Msg-id 87ejg0flv9.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Locales and Encodings  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Locales and Encodings
List pgsql-hackers
"Martijn van Oosterhout" <kleptog@svana.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


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Locale + encoding combinations
Next
From: Peter Eisentraut
Date:
Subject: Re: Locales and Encodings