Re: Locale implementation questions (was: Proof of concept COLLATE support with patch)

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Locale implementation questions (was: Proof of concept COLLATE support with patch)
Дата
Msg-id 87oe79ygfh.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Locale implementation questions (was: Proof of concept COLLATE support with patch)  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Locale implementation questions (was: Proof of concept COLLATE support with patch)  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> 2. Locale data needs to be combined with a charset and compiled to work
> with the library. PostgreSQL supports at least 15 charsets but we don't
> want to ship compiled versions of all of these (Debian learnt that the
> hard way). So, how do we generate the files people need.

That's just one of many lessons learned the hard way by distributions. Nor
will it be the last innovation in this area.

I really find this instinct of wanting to reimplement large swaths of the OS
inside Postgres (and annoying detail-ridden swaths that are hard to get right
and continually evolving too) to be a bad idea.

I can't believe it's harder to maintain an 

#ifdef HAVE_STRCOL_L
#else
#endif

than it is to try to maintain an entire independent locale library. Nor is it
simpler for sysadmins to have to maintain an entirely separate set of locales
independently from the system locales.

If you really are unhappy enough with OS setlocale implementations to want to
try to do this then it would be more helpful to do it outside of Postgres.
Package up the Apple setlocale library as a separate package that anyone can
install on Solaris, BSD, Linux or whatever. Then Postgres can just say "it
works fine with your OS library but your OS library might be very slow. Here's
a third-party library that you can install that is fast and may relieve any
problems you have with collation performance."

But I think that's getting ahead of things. Until Postgres even supports
collations using the OS libraries you won't even know if that's even
necessary.

-- 
greg



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Proof of concept COLLATE support with patch
Следующее
От: "Ilan Rabinovitch"
Дата:
Сообщение: OT: SCALE 4x -- Call For Papers