Re: [HACKERS] Re: [PATCHES] char/varchar locale support

Поиск
Список
Период
Сортировка
От Michal Mosiewicz
Тема Re: [HACKERS] Re: [PATCHES] char/varchar locale support
Дата
Msg-id 35606363.3884309@interdata.com.pl
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [PATCHES] char/varchar locale support  (Oleg Broytmann <phd@comus.ru>)
Список pgsql-hackers
Thomas G. Lockhart wrote:

> btw, if we do implement NATIONAL CHARACTER I would like to do so by
> having it fit in with the full SQL92 character sets and collating
> sequences capabilities. Then one could specify what NATIONAL CHAR means
> for an installation or perhaps at run time without having to
> recompile...

I fully agree that there should be a CREATE COLLATION syntax or similiar
with ability to add collation keyword in every place that needs a
character comparision, like btree indexes, orders, or simply comparision
operators.

This mean that we should start probably from creating three-parameter
comparision functions with added a third parameter to select collation.

Additionally, it's worth to note that using strcoll is highly expensive.
I've got some reports from people who used postgreSQL with national
characters and noticed performance drop-downs up to 20 times (Linux). So
it's needed to create a cheap comparision functions that will preserve
it's translation tables during sessions.

Anyhow, if anybody wants to try inefficient strcoll, long time ago I've
sent a patch to sort chars/varchars using it. But I don't recommend it.

Mike

--
WWW: http://www.lodz.pdi.net/~mimo  tel: Int. Acc. Code + 48 42 148340
add: Michal Mosiewicz  *  Bugaj 66 m.54 *  95-200 Pabianice  *  POLAND

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

Предыдущее
От: Brett McCormick
Дата:
Сообщение: Re: [HACKERS] Re: [PATCHES] char/varchar locale support
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Query cancel and OOB data