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 1uNChc-00EAlq-N6 for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 15:40:24 +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 1uNChY-00AsfO-So for pgsql-general@arkaria.postgresql.org; Thu, 05 Jun 2025 15:40:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uNChY-00AsfF-Hg for pgsql-general@lists.postgresql.org; Thu, 05 Jun 2025 15:40:21 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uNChX-000Npy-1W for pgsql-general@postgresql.org; Thu, 05 Jun 2025 15:40:20 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-2e541e0b974so769137fac.1 for ; Thu, 05 Jun 2025 08:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749138017; x=1749742817; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PbaoFVZDR82KnBcO8xV5MKOkY5d62zvPTvU2UV4cJ24=; b=aHFyDByjPju1CoUxgaHEpTEmZ3UUSM0BbsmjyAxY5K9Kwix5tpLLxi6tc8P4ItezyL 1Edm6uzz+iKo3wBgYkcCAelnvIQY7aCvKS1WTmfiFLMPQGH0tQqqlgO2n4S2z/5P3PPL kt7Bn7EaoCd78g6eBUc5JiuP32GkryP0xEJwwcSuek2o5CSk4vXVufAd6OBlS3pdfanT gk7YNDLW6y/D5SKOH7zvrPR5e7LDiLcFqTJMjBZ8D4k/k6GUEGoSmEGd1oVd3SwQ2IGp npo+ir5qtcIt9HEFgHMZRBmXe/k2dXkytZW3rF5ONKeoxLPSHL7BhBiloo4Ey/QWxY2K TrwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749138017; x=1749742817; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PbaoFVZDR82KnBcO8xV5MKOkY5d62zvPTvU2UV4cJ24=; b=p+AV5W1k1eeCLu54eRoCdXqwHPk9fm5WzuJ3ODmzuIyb1vrjgyCJswq2Xps08au+c2 zuw6nazrZsKmcxTjx5ijCrC1J1NJyUlHixxJpKhDdR5vgzz8y5i/jrEJmbZrMcKYS84f p/hx60ifgjAD1SQGZGBTY4Gwx7szTBOYdzlvb/DKlgJE9pTfGAi5f2PnbIYJ7apFYlNN KL6ykEyFmrSX2YtoeFa4GJ0W8W0aGmCebJE2HTSWlapMWHBp10SVQ49hfeCTPFe4+jbE YQ+KzMDEPvczOTMQqLUvnyXfeY9lnZfm94ad8Dzl8c64xUhMwBqSIWdk968FLK5Savpc gNXQ== X-Forwarded-Encrypted: i=1; AJvYcCXJyOaAyJmlKH1oBagHTZb7vTFmJKMy+LzX/XCiWYwr20itqir9F92gJajk7SFjyO1tFdbj0G6nS7yY7eUt@postgresql.org X-Gm-Message-State: AOJu0YzMceUAIabbHKCMs+lM62iVfhCgovNW7KXjrDjASLlStqqBMHS6 k8Fabh2uBKX0UiAlCVB5JNQh89bTKQA9AitSz4BcanBw5/784S3w89xzNYoC9XdXeHSTOfilUu0 OrYid3R1lo4bsZpP9H3HyA6Vdwft6z7SRdQ== X-Gm-Gg: ASbGncvlmSgCVQyh+m+t+TSpXmKcoQuQeQAYgjIya/sSRJ+VxdVWweObCjq1ZK10qXS ECZGYFPzN2pNP9HPBe+FrtJrys7RLo0Jmo5c8ObMYfdERWpIYX7wXbM2YTj23wM9eW/iyo9M0za R/4D2rWGFt/psLlt7//6e8uadfh39aIIq9RSY= X-Google-Smtp-Source: AGHT+IHU9HilKrMx/xhni+kOgBgZQLqp4c1q9wKYWVAFs5But4JzsxSNjVrMaQeXW48jqQFhboquvzRykAZGsDFQk0o= X-Received: by 2002:a05:6871:22cb:b0:2d4:ce45:6990 with SMTP id 586e51a60fabf-2e9bf1e8cb0mr5017911fac.7.1749138016887; Thu, 05 Jun 2025 08:40:16 -0700 (PDT) MIME-Version: 1.0 References: <5da10da1-c842-43fa-acf8-98a1fe8ddcfd@manitou-mail.org> In-Reply-To: <5da10da1-c842-43fa-acf8-98a1fe8ddcfd@manitou-mail.org> From: Dominique Devienne Date: Thu, 5 Jun 2025 17:40:04 +0200 X-Gm-Features: AX0GCFtpFMe6gIdTHRahtyH_Jd73ucFNLUQuInpxjo8L4XhvoqitvdDHPSsNWww Message-ID: Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server To: Daniel Verite Cc: Laurenz Albe , pgsql-general@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 5, 2025 at 5:01=E2=80=AFPM Daniel Verite wrote: > Dominique Devienne wrote: > > > locale 'C.UTF-8' or lc_collate 'C.UTF-8' lc_ctype 'C.UTF-8' > > > cannot work on Windows because Windows does not have a locale > > > named C.UTF-8, whereas a Linux system does (well at least recent > > > Linuxes. Some old Linuxes don't). > > > > But isn't the point of the new-in-v17 builtin provider is to be system > > independent??? > > Yes, definitely. > > But suppose your database has an extension that calls local-dependent > code, such as strxfrm() [1] for instance. > > The linked MSVC doc says: > > "The transformation is made using the locale's LC_COLLATE category > setting. For more information on LC_COLLATE, see setlocale. strxfrm > uses the current locale for its locale-dependent behavior" > > But what will be the value in LC_COLLATE when this extension code > is running in a database using the builtin provider? > It's the value found in pg_database.datcollate that was specified > when creating the database with the lc_collate or locale option. > > The builtin provider routines are used for code inside Postgres > core, but code outside its perimeter can still call libc functions > that depend on lc_collate and lc_ctype. So you're saying datcollate and datctype from pg_database are irrelevant to PostgreSQL itself, and only extensions might be affects? Which implies that I shouldn't worry about those differences? Am I reading you right? --DD