Re: Add standard collation UNICODE

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add standard collation UNICODE
Date: 2023-03-08 07:10:02
Message-ID: 311c1052-ec8c-117a-0ed2-948c0ea11dcc@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2023-03-08 07:24:33 RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message Julien Rouhaud 2023-03-08 06:56:14 Re: pg_upgrade and logical replication