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 1s6elP-000yAo-4O for pgsql-bugs@arkaria.postgresql.org; Mon, 13 May 2024 23:07: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 1s6elO-006N5O-Ux for pgsql-bugs@arkaria.postgresql.org; Mon, 13 May 2024 23:07:22 +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 1s6elO-006N5G-M4 for pgsql-bugs@lists.postgresql.org; Mon, 13 May 2024 23:07:22 +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.94.2) (envelope-from ) id 1s6elM-0004Pp-5p for pgsql-bugs@lists.postgresql.org; Mon, 13 May 2024 23:07:21 +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 44DN7I3R872240; Mon, 13 May 2024 19:07:18 -0400 From: Tom Lane To: Thomas Munro cc: "Haifang Wang (Centific Technologies Inc)" , "pgsql-bugs@lists.postgresql.org" Subject: Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607 In-reply-to: References: Comments: In-reply-to Thomas Munro message dated "Tue, 14 May 2024 10:47:23 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <872238.1715641638.1@sss.pgh.pa.us> Date: Mon, 13 May 2024 19:07:18 -0400 Message-ID: <872239.1715641638@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > Longer term I'm looking for something better than that though, because > it doesn't address the root cause (need for stable identifiers), and > will only ever allow us to fix problems with the old unstable names > *after* users complain that their database is dead, 3-6 months after > in fact due to release cycles. I think a dynamic mapping file might > be better? (Maybe win32locale.c should be able to read that kludge > table from a file that you can give it with an environment variable, > or something like that?) +1 for the long-term solution being more-stable locale identifiers. However, we should try to build something that will let users get out of these situations with the existing identifiers, so I like your idea of a plain-text mapping file for Windows locale names. I don't think an environment variable is necessary; just define a fixed name "$PGDATA/locale_map.txt" or such. If that file exists, just read it and map the pg_database field values with it. Maybe this shouldn't even be Windows-specific? Are there any cases where it'd save people's bacon on other platforms? regards, tom lane