Re: Add standard collation UNICODE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Add standard collation UNICODE
Date
Msg-id 311c1052-ec8c-117a-0ed2-948c0ea11dcc@enterprisedb.com
Whole thread Raw
In response to Re: Add standard collation UNICODE  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
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.




pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pg_upgrade and logical replication
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher