Re: Collation version tracking for macOS

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Rod Taylor <rbt(at)rbt(dot)ca>, Jim Nasby <nasbyj(at)amazon(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation version tracking for macOS
Date: 2022-06-07 21:38:03
Message-ID: Yp/FO6pHcYZfOtnq@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 7, 2022 at 03:43:32PM -0400, Tom Lane wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > On Wed, Jun 8, 2022 at 3:58 AM Rod Taylor <rbt(at)rbt(dot)ca> wrote:
> >> Is this more involved than creating a list of all valid Unicode characters (~144 thousand), sorting them, then running crc32 over the sorted order to create the "version" for the library/collation pair? Far from free but few databases use more than a couple different collations.
>
> > Collation rules have multiple levels and all kinds of quirks, so that
> > won't work.
>
> Yeah, and it's exactly at the level of quirks that things are likely
> to change. Nobody's going to suddenly start sorting B before A.
> They might, say, change their minds about where the digram "cz"
> sorts relative to single letters, in languages where special rules
> for that are a thing.
>
> The idea of fingerprinting a collation's behavior is interesting,
> but I've got doubts about whether we can make a sufficiently thorough
> fingerprint.

Rather than trying to figure out if the collations changed, have we ever
considered checking if index additions and lookups don't match the OS
collation and reporting these errors somehow?

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Indecision is a decision. Inaction is an action. Mark Batterson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-06-07 21:38:31 Re: Collation version tracking for macOS
Previous Message Tom Lane 2022-06-07 21:24:06 Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list