On 8/7/17 21:00, Peter Geoghegan wrote: > Actually, it's *impossible* for ICU to fail to accept any string as a > valid locale within CREATE COLLATION, because CollationCreate() simply > doesn't sanitize ICU names. It doesn't do something like call > get_icu_language_tag(), unlike initdb (within > pg_import_system_collations()). > > If I add such a test to CollationCreate(), it does a reasonable job of > sanitizing, while preserving the spirit of the BCP 47 language tag > format by not assuming that the user didn't specify a brand new locale > that it hasn't heard of.
I'm not sure what you are proposing here. Convert the input to CREATE COLLATION to a BCP 47 language tag? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers