Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfOh9-0007cK-U4 for pgsql-committers@arkaria.postgresql.org; Thu, 23 Mar 2023 17:25:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pfOh7-0007mw-QE for pgsql-committers@arkaria.postgresql.org; Thu, 23 Mar 2023 17:25:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfOh7-0007mn-JF for pgsql-committers@lists.postgresql.org; Thu, 23 Mar 2023 17:25:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfOh5-0006dS-58; Thu, 23 Mar 2023 17:25:45 +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 32NHPfWI1862097; Thu, 23 Mar 2023 13:25:41 -0400 From: Tom Lane To: Jeff Davis cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Handle the "und" locale in ICU versions 54 and older. In-reply-to: References: Comments: In-reply-to Jeff Davis message dated "Thu, 23 Mar 2023 17:09:50 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1862095.1679592341.1@sss.pgh.pa.us> Date: Thu, 23 Mar 2023 13:25:41 -0400 Message-ID: <1862096.1679592341@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > Handle the "und" locale in ICU versions 54 and older. > The "und" locale is an alternative spelling of the root locale, but it > was not recognized until ICU 55. To maintain common behavior across > all supported ICU versions, check for "und" and replace with "root" > before opening. > Previously, the lack of support for "und" was dangerous, because > versions 54 and older fall back to the environment when a locale is > not found. If the user specified "und" for the language (which is > expected and documented), it could not only resolve to the wrong > collator, but it could unexpectedly change (which could lead to > corrupt indexes). Hmm, should we back-patch this? Seems like existing branches would be even more at risk than v16, because more likely to be built with old ICU. OTOH, we do also run the risk of breaking installations that weren't broken before. regards, tom lane