On 04.03.23 19:29, Jeff Davis wrote:
I do like your approach though because, if someone is using a standard
collation, I think "not built with ICU" (feature not supported) is a
better error than "collation doesn't exist". It also effectively
reserves the name "unicode".

By the way, speaking of reserving names, I don't remember the reason for this bit in initdb.c:

/*
 * Add SQL-standard names.  We don't want to pin these, so they don't go
 * in pg_collation.h.  But add them before reading system collations, so
 * that they win if libc defines a locale with the same name.
 */

Why don't we want them pinned?

If we add them instead as entries into pg_collation.dat, it seems to work for me.

Another question: What is our current thinking on using BCP 47 names? The documentation says for example

"""
The first example selects the ICU locale using a “language tag” per BCP 47. The second example uses the traditional ICU-specific locale syntax. The first style is preferred going forward, but it is not supported by older ICU versions.
"""

My patch uses 'und' [BCP 47 style], which appears to be in conflict with that statement.

But we have had some discussions on how correct that statement is, but I don't remember the outcome.



Reply via email to