Re: Collation version tracking for macOS

From: Jeremy Schneider <schneider(at)ardentperf(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, "Nasby, Jim" <nasbyj(at)amazon(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation version tracking for macOS
Date: 2022-06-15 00:40:22
Message-ID: 450ADADD-FEE6-4217-A2C8-85F65DF52CD0@ardentperf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers




> On Jun 14, 2022, at 19:06, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> One difference would be the effect if ICU ever ships a minor library
> version update that changes the reported collversion.

If I’m reading it correctly, ICU would not change collation in major versions, as an explicit matter of policy around DUCET stability and versioning.

https://unicode.org/reports/tr10/#Stable_DUCET

> With some system of symlinks to make it all work with defaults for
> those who don't care, a libc could have
> /usr/share/locale/en_US(at)CLDR34(dot)UTF-8 etc so you could
> setlocale(LC_COLLATE, "en_US(at)CLDR34"), or something. I suppose they
> don't want to promise to be able to interpret the old data in future
> releases, and, as you say, sometimes the changes are in C code, due to
> bugs or algorithm changes, not the data.

If I understand correctly, files in /usr/share/locale aren’t enough because those only have the tailoring rules, and core algorithm and data (before applying locale-specific tweaks) also change between versions. I’m pretty sure glibc works similar to UCA in this regard (albeit based on ISO 14651 and not CDLR), and the Unicode link above is a good illustration of default collation rules that underly the locale-specific tweaks.

-Jeremy

Sent from my TI-83

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2022-06-15 01:34:02 Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
Previous Message Zheng Li 2022-06-15 00:14:14 Re: Support logical replication of DDLs