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 1vVDIr-00GEHK-28 for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Dec 2025 18:28:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVDIq-001kha-1v for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Dec 2025 18:28:13 +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 1vVDIq-001khR-0y for pgsql-hackers@lists.postgresql.org; Mon, 15 Dec 2025 18:28:13 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVDIp-000pS0-0k for pgsql-hackers@lists.postgresql.org; Mon, 15 Dec 2025 18:28:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5BFIS6Td2117911; Mon, 15 Dec 2025 13:28:06 -0500 From: Tom Lane To: Bryan Green cc: pgsql-hackers@lists.postgresql.org Subject: Re: PRI?64 vs Visual Studio (2022) In-reply-to: References: <20250331.152829.1921392690375275165.horikyota.ntt@gmail.com> <001bdc3b-ef94-4f24-b017-ac8ff0a2ea55@eisentraut.org> <1372793.1763519315@sss.pgh.pa.us> <1377512.1763522154@sss.pgh.pa.us> <1462038.1763567038@sss.pgh.pa.us> <1881391.1765782112@sss.pgh.pa.us> <1991599.1765818338@sss.pgh.pa.us> Comments: In-reply-to Bryan Green message dated "Mon, 15 Dec 2025 11:24:34 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2117909.1765823286.1@sss.pgh.pa.us> Date: Mon, 15 Dec 2025 13:28:06 -0500 Message-ID: <2117910.1765823286@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryan Green writes: > On 12/15/2025 11:05 AM, Tom Lane wrote: >> ... That's >> colored by seeing that less than half of the buildfarm is finding any >> variant of es_ES to test in. That's not great, but I'm not seeing >> anything to be done about it. The only locale names we can be sure >> will be accepted are C/POSIX, and I'd expect gettext() to >> short-circuit that case and not look for a translation. I'm thinking >> though that it's still worth checking that the untranslated string is >> processed correctly. > The GNU gettext implementation does not short-circuit that. It still > goes through the path of trying to find the message catalogue, it fails, > there is no fallback, messages are untranslated. This is true on Windows > as well as Linux. It'd be great to not need the assumption of es_ES being installed. However, I tried making a POSIX.po file and setting lc_messages to POSIX, and it didn't work. The msgfmt infrastructure seemed unfazed and installed a .mo file under $sharedir/locale/POSIX/LC_MESSAGES as I'd expect, but no translation happened (this on a Linux box). Same with 'C'. It did work if I set lc_messages to 'C.utf8', which is a known name according to this box's "locale -a", but this doesn't give me a warm feeling about this approach being a lot more portable than what we have. Any ideas? regards, tom lane