varchar sort ordering ignore blanks - SOLVED!

Поиск
Список
Период
Сортировка
От Luca Arzeni
Тема varchar sort ordering ignore blanks - SOLVED!
Дата
Msg-id trinity-b1456065-4ad9-4cfc-9313-e3915b3c4dc6-1435442725977@3capp-mailcom-lxa05
обсуждение исходный текст
Список pgsql-general
To make a long story short, few years ago I was complaining that the sort order of varchar, in UTF-8, was ignoring
blanks,that is that the sort order was: 

XXXXa
XXXX a
XXXXA
XXXX A
XXXXà
XXXXb
XXXXB

But, i was in need of a sort order that would place blanks BEFORE the other char, that is I would like to have the
followingsort order: 

XXXX a
XXXX A
XXXXa
XXXXA
XXXXà
XXXXb
XXXXB

Now, using Debian Jessie, I found the solution to this issue. I needed to change the file

/usr/share/i18n/locales/iso14651_t1_common

placing in the proper position the sort order.

This is the output of the diff between the file before and after the modification:

diff iso14651_t1_common.orig  iso14651_t1_common

4837d4836
< <U0020> IGNORE;IGNORE;IGNORE;<U0020> # 32 <SP>
5080a5080
> <U0020> <BAS>;<MIN>;IGNORE # 32<SP>

Beware: the change is sistem wide, and regards all character sets and locales...



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

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: Inserting from multiple processes?
Следующее
От: Larry Meadors
Дата:
Сообщение: Weird insert issue