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.94.2) (envelope-from ) id 1uMn9Z-003qvb-5n for pgsql-general@arkaria.postgresql.org; Wed, 04 Jun 2025 12:23:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uMn9W-00Bnnv-W9 for pgsql-general@arkaria.postgresql.org; Wed, 04 Jun 2025 12:23:31 +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.94.2) (envelope-from ) id 1uMn9W-00Bnnn-Im for pgsql-general@lists.postgresql.org; Wed, 04 Jun 2025 12:23:31 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uMn9V-000AMZ-10 for pgsql-general@postgresql.org; Wed, 04 Jun 2025 12:23:30 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-2db9e29d3bcso2828122fac.1 for ; Wed, 04 Jun 2025 05:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749039808; x=1749644608; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=t4L2KfYLIcPp2YobYSx6FGCJpz4Bukcinaz0ecqsISA=; b=PFI39wje9krrLvYq9EqRfXkDsMc83qgf6bsWSnHqJXEYpUk4kO8peF4NQG5qVKwIvL HjDVWZvqTBgHDT3UFnVf81gSdrVmYxyblZzhaQM21irjCpm0g/FyoIoVd4xa2nSmAt0Q dyw0ayrf3qB7WHUzBzTtqMaK1eo0GnFeX9KzOTQrJrn8HAbU2IPgYBnrElU3rPreYYYQ t6z0QSR5HXBia5PCF6fW5glCMUKV3fB7SkFYrQRz7yFwhUpZK5OAG3v7VicPGrOA5jsR ScNzDsJTK9OSmnJ9CCfryneZZ2482YcfJLx8GYLIsQ4uF+HE2+3fseTam7dfn+ZsPAxU hbvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749039808; x=1749644608; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=t4L2KfYLIcPp2YobYSx6FGCJpz4Bukcinaz0ecqsISA=; b=D7GDF0Pn2394ZIr6vjQICBAw7vx1IMXTkeHRCdIy30tAKJGSYCfBNQeNh9JEcGOJXa lTvgPEGSXykSx9NWT/ccvFYnKlriEdsFj+J114e4DgLCBrLBEN1MElxKumdywmNv+gUG 1vplj0B/tmISnpF73/dBMHSfIVjrnTkB29KnVBq2toE6jTTQjUZfZQRKDa5++Qdmij/e xO1cLumsn4SooRJr6NyQHBKfCnpcUXvl3ZCn/PsONxs2kMzi87opi5EI5Hcw6X+HlDbK cWDDlycPWNSQjU4jIFU1xPX3ECoRJ6GWq4MwhN4fTzJI+VGhHoLzZQJ+r2wFsYmi3/8S v8aQ== X-Gm-Message-State: AOJu0YzenoVPLTMfg4siMrmGcXLMtRW/dEx63p5mRgm3FeerWXXE5wZX Am6GRMSx2QxTxNb7BDdGr/zYEr5t2FwkFgBu5M+3wD+nMWeH7cMXEk5hmy1sWjjrZZFta6Mqssd SPL9SF9HyYH1NYz0nhcntv/XhUcJqgoUapA== X-Gm-Gg: ASbGncu8Kv42msb76x0Sbv3ybUmlDav5bIDg17Mjr9TB8RmXzvrutG8+vS7kQ7qmi1U JfhQ5TE/BOhzEmxWSB0Nk4oG+txI9Seb0jvJpNK+vQ+GacBywiNuZTvtI0HFuNMxobpTLt+b4Om COVe6Gyizy1qR+eXdbDLNOb28XYTQ+/is+1dw= X-Google-Smtp-Source: AGHT+IHnKgGfI/GeU1SbR5WhmVsoYyH9Qo7UupDkWBca/CIou1ifAChk9n/ZLj+aBbHGR+tbd1fX5WRDKP+PkfPQsPY= X-Received: by 2002:a05:6870:9692:b0:2d9:9c91:ccde with SMTP id 586e51a60fabf-2e9bf3ab492mr1490616fac.22.1749039808250; Wed, 04 Jun 2025 05:23:28 -0700 (PDT) MIME-Version: 1.0 From: Dominique Devienne Date: Wed, 4 Jun 2025 14:23:17 +0200 X-Gm-Features: AX0GCFsa9BWQdUf8QfBSAy8cTVn_tckGy0xrOn-OBJa2v_fnB4bv0NPak2qlEXw Message-ID: Subject: LOCALE C.UTF-8 on EDB Windows v17 server To: pgsql-general@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi. For a long time, I was just doing a plain CREATE DATABASE, using whatever local template1 was using. Then when v17 came out, I wanted to force UTF-8 for the encoding, *AND* use the new C.UTF-8 builtin locale, to not depend on libc on Linux. (which forced me to use template0 explicitly). And since it was builtin, I just assumed Windows would be fine too. But it's not apparently not... I'm using the official v17.5 EDB installer, for the Windows server. The command I'm using (from a libpq trace) is: create database "dd_v168" encoding 'UTF8' locale 'C.UTF-8' locale_provider 'builtin' template template0 On Windows, I'm getting 2025-06-04 14:07:41.227419 B 155 ErrorResponse S "ERROR" V "ERROR" C "42809" M "invalid LC_COLLATE locale name: "C.UTF-8"" H "If the locale name is specific to ICU, use ICU_LOCALE." F "dbcommands.c" L "1057" R "createdb" \x00 Given that v17.5 Windows returns postgres=# select * from pg_collation where collname ilike '%utf%'; oid | collname | collnamespace | collowner | collprovider | collisdeterministic | collencoding | collcollate | collctype | colllocale | collicurules | collversion -----+-----------+---------------+-----------+--------------+---------------------+--------------+-------------+-----------+------------+--------------+------------- 811 | pg_c_utf8 | 11 | 10 | b | t | 6 | | | C.UTF-8 | | 1 (1 row) While Linux returns: ddevienne=> select * from pg_collation where collname ilike '%utf%'; oid | collname | collnamespace | collowner | collprovider | collisdeterministic | collencoding | collcollate | collctype | colllocale | collicurules | collversion -------+-----------------+---------------+-----------+--------------+---------------------+--------------+-----------------+-----------------+------------+--------------+------------- 811 | pg_c_utf8 | 11 | 10 | b | t | 6 | | | C.UTF-8 | | 1 12351 | C.utf8 | 11 | 10 | c | t | 6 | C.utf8 | C.utf8 | | | 12354 | en_AU.utf8 | ... (17 rows) I tried instead create database "dd_v168" encoding 'UTF8' locale 'pg_c_utf8' locale_provider 'builtin' template template0 but that's still KO with 2025-06-04 14:10:58.748508 B 157 ErrorResponse S "ERROR" V "ERROR" C "42809" M "invalid LC_COLLATE locale name: "pg_c_utf8"" H "If the locale name is specific to ICU, use ICU_LOCALE." F "dbcommands.c" L "1057" R "createdb" \x00 First, given the above, I'm no longer sure what I was doing on Linux was actually using the new built-in collation. Second, I'm not confused between locales and collations! What the command supposed to work portably with v17 on both Linux and Windows server, that uses the new built-in collations (and locale???) I'd appreciate some clarifications please. --DD