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 1rNhnt-00EoCy-Q8 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jan 2024 23:16:10 +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 1rNhns-0086gy-Rj for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jan 2024 23:16:08 +0000 Received: from magus.postgresql.org ([87.238.57.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 1rNhns-0086gS-Hw for pgsql-hackers@lists.postgresql.org; Wed, 10 Jan 2024 23:16:08 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNhnp-000uTw-QN for pgsql-hackers@lists.postgresql.org; Wed, 10 Jan 2024 23:16:07 +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 40ANG3dU2678843; Wed, 10 Jan 2024 18:16:03 -0500 From: Tom Lane To: Kyotaro Horiguchi cc: pgsql-hackers@lists.postgresql.org Subject: Re: initdb --no-locale=C doesn't work as specified when the environment is not C In-reply-to: <20231127.120042.1919434306028321316.horikyota.ntt@gmail.com> References: <20231122.162700.1995154567625541112.horikyota.ntt@gmail.com> <1696010.1700669041@sss.pgh.pa.us> <20231127.120042.1919434306028321316.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Mon, 27 Nov 2023 12:00:42 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2678841.1704928563.1@sss.pgh.pa.us> Date: Wed, 10 Jan 2024 18:16:03 -0500 Message-ID: <2678842.1704928563@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > It seems somewhat intentional that only lc_messages references the > environment at boot time. On the other hand, previously, in the > absence of a specified locale, initdb would embed the environmental > value in the configuration file, as it seems to be documented. Given > that initdb is always used for cluster creation, it's unlikey that > systems depend on this boot-time default for their operation. Yeah, after further reflection there doesn't seem to be a lot of value in leaving these entries commented-out, even in the cases where that's technically correct. Let's just go back to the old behavior of always uncommenting them; that stood for years without complaints. So I committed your latest patch as-is. > By the way, the lines around lc_* in the sample file seem to have > somewhat inconsistent indentations. Wouldnt' it be preferable to fix > this? (The attached doesn't that.) They look all right if you assume the tab width is 8, which seems to be what is used elsewhere in the file. I think there's been some prior discussion about whether to ban use of tabs at all in these sample files, so as to reduce confusion about how wide the tabs are. But I'm not touching that question today. regards, tom lane