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 1ps03h-0003TD-Ao for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 11:45:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps03e-0000tW-Vc for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 11:45:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps03e-0000tM-Lg for pgsql-hackers@lists.postgresql.org; Thu, 27 Apr 2023 11:45:06 +0000 Received: from mail.verite.pro ([185.16.44.216]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps03b-002AQN-HO for pgsql-hackers@postgresql.org; Thu, 27 Apr 2023 11:45:05 +0000 Received: by mail.verite.pro (Postfix, from userid 1000) id 804628C017F; Thu, 27 Apr 2023 13:45:00 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: Add standard collation UNICODE From: "Daniel Verite" To: "Peter Eisentraut" Cc: "pgsql-hackers" In-Reply-To: <1293e382-2093-a2bf-a397-c04e8f83d3c2@enterprisedb.com> Date: Thu, 27 Apr 2023 13:44:55 +0200 Message-Id: <49417853-7bdd-4b23-a4e9-04c7aff33821@manitou-mail.org> X-Mailer: Manitou v1.7.3 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut wrote: > COLLATE UNICODE >=20 > instead of >=20 > COLLATE "und-x-icu" >=20 > or whatever it is, is pretty useful. >=20 > So, attached is a small patch to add this. This collation has an empty pg_collation.collversion column, instead of being set to the same value as "und-x-icu" to track its version. postgres=3D# select * from pg_collation where collname=3D'unicode' \gx -[ RECORD 1 ]-------+-------- oid | 963 collname | unicode collnamespace | 11 collowner | 10 collprovider | i collisdeterministic | t collencoding | -1 collcollate |=20 collctype |=20 colliculocale | und collicurules |=20 collversion |=20 The original patch implements this as an INSERT in which it would be easy to fix I guess, but in current HEAD it comes as an entry in include/catalog/pg_collation.dat: { oid =3D> '963', descr =3D> 'sorts using the Unicode Collation Algorithm with default settings', collname =3D> 'unicode', collprovider =3D> 'i', collencoding =3D> '-1', colliculocale =3D> 'und' }, Should it be converted back into an INSERT or better left in this file and collversion being updated afterwards? Best regards, --=20 Daniel V=E9rit=E9 https://postgresql.verite.pro/ Twitter: @DanielVerite