Re: How to add locale support for each column?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: How to add locale support for each column?
Дата
Msg-id 87ekkykzso.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: How to add locale support for each column?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: How to add locale support for each column?  (Dennis Bjorklund <db@zigo.dhs.org>)
Re: How to add locale support for each column?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:

> 2) switching the locale at run time is too expensive when using the system
> library.

Fwiw I did some experiments with this and found it wasn't true. At least with
glibc I could switch the locale to what I wanted and back for every record in
a million record table with basically no noticeable effect on the query
execution time.

Of course not every system will have an equally speedy implementation. But I
don't think that's an argument for postgres to reimplement portions of the OS.
If the OS locale handling is slow on some OS's then postgres should just warn
its users that using locales on those OS's will be slow.

In any case I suspect more than just the glibc implementation cache locales in
memory at this point. It seems like just too obvious a feature and more and
more applications require locale switching to be fast anyways.

-- 
greg



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

Предыдущее
От: "Michael Paesold"
Дата:
Сообщение: Re: SAVEPOINT SQL conformance
Следующее
От: "Michael Paesold"
Дата:
Сообщение: Re: [GENERAL] Rollback on Error