Search Postgresql Archives

varchar sort ordering ignore blanks - SOLVED!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 following sort 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...



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux