Andrey Borodin wrote: > Overall patch looks solid and thoughtful work and adds important > functionality.
I tried the patch, with some minor changes to build with HEAD. I was surprised by the interface, that is, the fact that a user is not allowed to freely choose the ICU collation of a database, in constrast with CREATE COLLATION. AFAIU, when the "default collation provider" is ICU, CREATE DATABASE still expects a libc locale in the lc_collate/lc_ctype arguments. The code will automatically find an ICU equivalent by matching the language, and it seems that the country is ignored? So if we wanted a database with an ICU collation like, say, "es@collation=traditional" or "es-u-co-trad" as expressed with a BCP-47 tag, or anything that is not defined by only a language, would it be possible? I have the impression it wouldn't. This is not something that could be easily improved after the fact because getting the ICU collation through a libc collation is a user-interface choice. I think users would rather be able to create a database with something like: CREATE DATABASE foo COLLPROVIDER='icu' LOCALE='icu_locale' | LC_COLLATE='icu_locale' | LC_CTYPE='icu_locale' ... which would be in line with CREATE COLLATION. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite