Hi everyone! 

> 10 февр. 2018 г., в 20:45, Andrey Borodin <x4...@yandex-team.ru> написал(а):
> 
> I'm planning to provide review
> 

So, I was looking into the patch.
The patch adds:
1. Ability to specify collation provider (with version) in --locale for initdb 
and createdb. 
2. Changes to locale checks
3. Sets ICU as default collation provider. For example "ru_RU@icu.153.80.32.1" 
is default on my machine with patch
4. Tests and necessary changes to documentation

With patch I get correct ICU ordering by default
postgres=# select unnest(array['е','ё','ж']) order by 1;
 unnest 
--------
 е
 ё
 ж
(3 rows)

While libc locale provides incorrect order (I also get same ordering by default 
without patch)

postgres=# select c from unnest(array['е','ё','ж']) c order by c collate 
"ru_RU";
 c 
---
 е
 ж
 ё
(3 rows)


Unfortunately, neither "ru_RU@icu.153.80.32.1" (exposed by LC_COLLATE and other 
places) nor "ru_RU@icu" cannot be used by collate SQL clause.
Also, patch removes compatibility with MSVC 1800 (Visual Studio 2013) on 
Windows XP and Windows Server 2003. This is done to use newer locale-related 
functions in VS2013 build.

If the database was initialized with default locale without this patch, one 
cannot connect to it anymore
psql: FATAL:  could not find out the collation provider for datcollate 
"ru_RU.UTF-8" of database "postgres"
This problem is mentioned in commit message of the patch. I think that this 
problem should be addressed somehow.
What do you think?

Overall patch looks solid and thoughtful work and adds important functionality.

Best regards, Andrey Borodin.

Reply via email to