Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyf77-0004iR-Er for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jun 2022 19:43:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyf75-00084s-WB for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jun 2022 19:43:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyf75-00084j-MI for pgsql-hackers@lists.postgresql.org; Tue, 07 Jun 2022 19:43:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyf73-0005In-Gr for pgsql-hackers@postgresql.org; Tue, 07 Jun 2022 19:43:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 257JhWhs1310018; Tue, 7 Jun 2022 15:43:33 -0400 From: Tom Lane To: Thomas Munro cc: Rod Taylor , Jim Nasby , Jeremy Schneider , Peter Eisentraut , pgsql-hackers Subject: Re: Collation version tracking for macOS In-reply-to: References: <381977b1-0898-cb6f-a427-3b5d873e81bd@enterprisedb.com> <231072.1654273317@sss.pgh.pa.us> <1874de62-6bec-4bc1-1d14-0a2730b125da@ardentperf.com> <366234.1654289888@sss.pgh.pa.us> <0867fe37-abbd-77ba-aafc-572074978bb0@amazon.com> <976279.1654561524@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Wed, 08 Jun 2022 07:31:19 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1310016.1654631012.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Jun 2022 15:43:32 -0400 Message-ID: <1310017.1654631012@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Wed, Jun 8, 2022 at 3:58 AM Rod Taylor wrote: >> Is this more involved than creating a list of all valid Unicode charact= ers (~144 thousand), sorting them, then running crc32 over the sorted orde= r to create the "version" for the library/collation pair? Far from free bu= t 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. regards, tom lane