Re: [HACKERS] Patch to address concerns about ICU collcollatestability in v10 (Was: CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?)
От | Peter Geoghegan |
---|---|
Тема | Re: [HACKERS] Patch to address concerns about ICU collcollatestability in v10 (Was: CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?) |
Дата | |
Msg-id | CAH2-WzmutFeBY4uPMdWuRKXt5RxA7zt7jE93e+sGfvKqqRLK3g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Patch to address concerns about ICU collcollatestability in v10 (Was: CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?) (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Список | pgsql-hackers |
On Mon, Sep 25, 2017 at 11:42 AM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > On 9/25/17 00:24, Peter Geoghegan wrote: >> * Creates root collation as root-x-icu (collcollate "root"), not >> und-x-icu. "und" means undefined language. > > I'm curious about this point. "und" is defined in BCP 47. I don't see > "root" defined anywhere. ICU converts the root collation to "und", > AFAIK, so it seems to agree with the current naming. In my patch, "root" is a string that is passed to get a language tag. That's technically in the old format. I think that this is another ICU vs. UCA/CLDR thing (this causes much confusion). Note that "root" is mentioned in the ICU locale explorer, for example: https://ssl.icu-project.org/icu-bin/locexp Note also that ucol_open() comments/docs say this: * @param loc The locale containing the required collation rules.* Special values for locales can be passed in-* if NULL is passed for the locale, the default locale* collation rules will be used. If empty string("") or* "root" are passed, UCA rules will be used. I went with "root" because that produces a meaningful/useful display name for pg_collation, and seems to be widely used elsewhere. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: