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 1n5sua-0007pD-Pb for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 17:20:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5suY-0002R6-Tx for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 17:20:18 +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 1n5suY-0002Qx-KH for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 17:20:18 +0000 Received: from verite.pro ([195.154.133.58] helo=sd-76392.dedibox.fr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5suU-0000cN-93 for pgsql-hackers@postgresql.org; Fri, 07 Jan 2022 17:20:18 +0000 Received: by sd-76392.dedibox.fr (Postfix, from userid 1000) id D20822240245; Fri, 7 Jan 2022 18:19:11 +0100 (CET) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: ICU for global collation From: "Daniel Verite" To: "Julien Rouhaud" Cc: Peter Eisentraut , Pgsql-Hackers In-Reply-To: <20220107090329.lnsy6tnodrrbmyy5@jrouhaud> Date: Fri, 07 Jan 2022 18:19:09 +0100 Message-Id: <33af6926-cc9f-486d-8db1-41c575b9a9cb@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 Julien Rouhaud wrote: > If you want a database with an ICU default collation the lc_collate > and lc_ctype should inherit what's in the template database and not > what was provided in the LOCALE I think. You could still probably > overload them in some scenario, but without a list of what isn't > ICU-aware I can't really be sure of how often one might have to do > it. I guess we'd need that when creating a database with a different encoding than the template databases, at least. About what's not ICU-aware, I believe the most significant part in core is the Full Text Search parser. It doesn't care about sorting strings, but it relies on the functions from POSIX , which depend on LC_CTYPE (it looks however that this could be improved by following what has been done in backend/regex/regc_pg_locale.c, which has comparable needs and calls ICU functions when applicable). Also, any extension is potentially concerned. Surely many extensions call functions from ctype.h assuming that the current value of LC_CTYPE works with the data they handle. Best regards, --=20 Daniel V=E9rit=E9 PostgreSQL-powered mailer: https://www.manitou-mail.org Twitter: @DanielVerite