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 1uN0iN-009dGG-G5 for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 02:52:23 +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 1uN0iJ-002qWt-Ea for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 02:52:20 +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 1uN0iI-002qWl-Pi for pgsql-general@lists.postgresql.org; Thu, 05 Jun 2025 02:52:19 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uN0iH-000HKt-0l for pgsql-general@postgresql.org; Thu, 05 Jun 2025 02:52:18 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22c336fcdaaso3782605ad.3 for ; Wed, 04 Jun 2025 19:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1749091936; x=1749696736; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Mn3iGbdnjKDAXAr4r9oX54KeeqXhGFWK0vtXFTGhwps=; b=IXyE1IzfDEpyZa01JPwXRsjgtobE5oriFRDFta3HsKPONhMBBa+DtcsnlssSZVVmdZ rCazO6E6+SFirpqZAxQrvryT6UynekvZZM93BRD/ak9sXC+rdS4nBr9dwK3FG3GxGaFz Oix9Nmtk2Gv6LhFWaaiEtoaZvSGuGNT0pWPrrnOtqTnHb7swcGMaN2HR1d0ADnLylP4u BEIuUdUxGypCJHd3aEOjLjzWnx9ogR4FQ5Bm5J45MD63Etrj1rFx9SxJGbFAFYSB00VU 589Hecw3JVPAA2EjpN5l50tx5ww77mBo5wB9Fu2VP8DkEEvHHa5/4kYo+KrerHSxucZj SWNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749091936; x=1749696736; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Mn3iGbdnjKDAXAr4r9oX54KeeqXhGFWK0vtXFTGhwps=; b=otB1mj+nkzoaPMAgl1hzuW5trynT/UYIby+gqt2Syp/dTx5cqUsr0QmUHHD3GCHnVg 1ySraPnKpkrplxBq3zkmnVEUS4uHLpNVrmsPpOZtPnwY2ObTE6MlVEwV1KIMhS7OVl2H t2EIw+2LiF+GA13SCWRH5jvmiuMM0rALG0waHayUrTAoJ3KVeUx9ty9fVeo2FzGbe2Cb Hn2ZpzGXh9v5+U61gHnUyzfSRsV0yfWvy1aymJbxZW4IbMuYFgVj3uaWm09lXeK6ro+q hXr0FaFVwuczli4Yv+HY7Mmk2BlfXOYmrLGF1i2xNJ8E2ed3Ifnh5qEcay4ZPQBtq9Ls Vv6g== X-Forwarded-Encrypted: i=1; AJvYcCXmXsQKsKWL4yvHeI2OBJ/4Py2siHq6HIZIBExa7nrnDxpmD6RvQ5XZ4YrrlTpQjrd3x6CVO9fSzkFy19fK@postgresql.org X-Gm-Message-State: AOJu0YzfbbfkNZILgjG4aimDbe1o0YyK9OXfe1Xf3Ox1yTdjYShKf0IG 9aJf/vDnsC48esKbHI5TjiuTQ9URXECzgvZZ2H2+ZcuvO4RPa3GgaoUdgoDaM1QCFdG3E6jAmss KHN8= X-Gm-Gg: ASbGncskCPeahAzdCkIPSnH3sqZXLr2Tz8H9KI6rrzumKn+fsyzE+w41KiXLxDFjDVp M0CypEArrakqlftKAFs7QC/L/kJYIMG9clnDj2Pu930VYcZH1ybN2xwEye2kvR0DwO1rCHRWyne vbUZiyy7NUrBXummVBnOAqECEjXGF2SsIv1XDIV00TlUMr/+Hxn4WPQNRRd9RGzWzFl03nXc32U lm5mBYcGJf83bfQ7b/7IHRcCrfhnPzIF0WwZT33JeeOQPmWBBwRobOHgtdXUmmGCYIrrTryenbe rDT3+fjCkCSea8NkCJIg0PEPuFMvWyKa9r1OxwoAiGaY1LXYXhYZHBEypan030+LYa8QaiVhiLX dJTIMHdVMVqaNZQkOvm0meg== X-Google-Smtp-Source: AGHT+IEG9U1sR1JhuWt37Di/apM9UNmsQKUbF2axtKIY4cxplpsORspvtt4nk2R1/wBWFJdjJWMAUA== X-Received: by 2002:a17:902:f54b:b0:234:8c52:1f9b with SMTP id d9443c01a7336-235e11fde36mr76490505ad.43.1749091936163; Wed, 04 Jun 2025 19:52:16 -0700 (PDT) Received: from jeff-ws-bridge.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506bd92f8sm110308345ad.88.2025.06.04.19.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jun 2025 19:52:15 -0700 (PDT) Message-ID: <2cd2cf04ba6ea21678b893dbfebe97bcf82726dc.camel@j-davis.com> Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server From: Jeff Davis To: Dominique Devienne , pgsql-general@postgresql.org Date: Wed, 04 Jun 2025 19:52:14 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-06-04 at 14:23 +0200, Dominique Devienne wrote: > create database "dd_v168" encoding 'UTF8' locale 'C.UTF-8' > locale_provider 'builtin' template template0 I believe what you want is: create database "dd_v168" encoding 'UTF8' builtin_locale 'C.UTF-8' locale_provider 'builtin' template template0 notice "builtin_locale" instead of "locale". CREATE DATABASE options are confusing due to some historical reasons. LOCALE gets expanded (effectively) into LC_COLLATE and LC_CTYPE, but the ICU and builtin providers don't use those for collation. Therefore, we have ICU_LOCALE and BUILTIN_LOCALE to specify the locales for those providers. Sorry -- I know that's confusing, but I don't know a good way to fix it without breaking previous commands. > On Windows, I'm getting I tried on windows and linux and got the same result. > I tried instead >=20 > create database "dd_v168" encoding 'UTF8' locale 'pg_c_utf8' > locale_provider 'builtin' template template0 The previous name was correct. "pg_c_utf8" is the identifier for the collation object in pg_collation. > Second, I'm not confused between locales and collations! Locales are the names as the provider understands them; the collation is an object in pg_collation that points to that locale (along with metadata). For instance, there's a collation named "en_US" in pg_collation, which points to the libc provider and locale name 'en_US.utf8'. There's also a collation named "en-US-x-icu" in pg_collation which points to the ICU provider and locale name 'en-US'. In other words, the collation objects are a layer of indirection to what the provider actually understands. Regards, Jeff Davis