Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKDlH-000jjn-0a for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2026 11:16:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKDlG-00Be67-0I for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2026 11:16:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKDlF-00Be5z-2E for pgsql-general@lists.postgresql.org; Tue, 05 May 2026 11:16:21 +0000 Received: from dverite2024.planet-service.net ([185.16.44.252] helo=mail.verite.pro) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wKDlC-00000000IdI-31PB for pgsql-general@lists.postgresql.org; Tue, 05 May 2026 11:16:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=manitou-mail.org; s=mail; t=1777979775; bh=fxJzFp6nm4Kpqlikv3m8YozyrpmlBNDfx32XfOTri/s=; h=From:To:Cc:Subject:In-Reply-To:Date:From; b=OcES5Ar5GfWG4/bP2PVruR+GSBp75YfZ7yIRROfrYNVe6QYSzmgXiFqzLfWtllYSF y1aMS0dib1P1QSWIADw507iMpxQ34+tOeXV13lNvTRESg6lPwjGlxkehiR5l/3lfEH qAnVP29semyiGMHPU/LSS9qHmJIl28o4ryFi2VTQa3puKqM5LROlfR6gU99CvlCWsr zkiHe8wuMoL0rqaLa6doAd1h1Gc1o+Auk75LY02izuHwsT9S+2o3tfMMqOSkaKsBko 7LrrrtALQmlJXA15jKxaEEAIN/9hgoqkZpudNcWgw5lE92c5XkivBWfrTPRD9nwQga LE5ddiC05D4og== Received: by mail.verite.pro (Postfix, from userid 1000) id E9F1D2C05FD; Tue, 5 May 2026 13:16:15 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "Daniel Verite" To: "Laurenz Albe" Cc: Ron Johnson , pgsql-general@lists.postgresql.org Subject: Re: Choosing default collation/ctype In-Reply-To: Date: Tue, 05 May 2026 13:16:14 +0200 Message-Id: X-Mailer: Manitou v1.7.3 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe wrote: > > So if you target Postgres 17+, C.UTF-8 from the builtin provider is > > a better choice for UTF-8 databases than "C" . >=20 > Yes, "builtin" and the "C" collation is the best default value. But my point was that, no, it's not. Let's show a concrete example with Postgres 18: postgres=3D# create database dbc=20 template=3D'template0' locale_provider=3D'builtin' builtin_locale=3D'C' ; CREATE DATABASE postgres=3D# \c dbc You are now connected to database "dbc" as user "postgres". dbc=3D# select upper('=E9t=E9'); upper=20 ------- =E9T=E9 (1 row) It is not the correct uppercasing. On the other hand the "C.UTF-8" locale, as opposed to "C", produces the correct result. postgres=3D# create database dbcutf8=20 template=3D'template0' locale_provider=3D'builtin' builtin_locale=3D'C.UTF-8' ; CREATE DATABASE postgres=3D# \c dbcutf8 You are now connected to database "dbcutf8" as user "postgres". dbcutf8=3D# select upper('=E9t=E9'); upper=20 ------- =C9T=C9 (1 row) Best regards, --=20 Daniel V=E9rit=E9=20 https://postgresql.verite.pro/