Re: Locales and Encodings

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Locales and Encodings
Дата
Msg-id 20071012161557.GC23216@svana.org
обсуждение исходный текст
Ответ на Re: Locales and Encodings  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Locales and Encodings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: Locales and Encodings
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pg_tablespace_size()