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 1paChQ-0005Pl-VT for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 09:36:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1paChP-0008Cl-SN for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 09:36:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paChP-0008Cc-IJ for pgsql-hackers@lists.postgresql.org; Thu, 09 Mar 2023 09:36:35 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paChM-0003di-Oy for pgsql-hackers@postgresql.org; Thu, 09 Mar 2023 09:36:34 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 1FE115809AA; Thu, 9 Mar 2023 04:36:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 09 Mar 2023 04:36:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1678354592; x=1678361792; bh=0QyCW3di8JCLUjpo3rFxhNIv5ZQPEEkVQ7J H119LdtY=; b=AulZAoqPQoredYXOqoqLBro9OKAF3COt6Qtv5L+t4SnhrVsTc8h kiKBynBbutWoyrYVlbdFhu7lwDrco8UdItZvkhSkGybU0hxb9/sixmD+DKeiYE9t d0Cp276UzNuZqExcvQjmS0JApPAzMlDvkgn00NNt/or43qRHdq/Mit53lCU0l32u UvZbeHxM8jDQ2qyJSgM+5DXa+9jKjiWHLW9aYYC7CwzoSVMwO8KhfH830Oa1lsoJ vJvdShCFd+RZe09C9Xw6yD7GU/pLACxob/jz/qxDc4WDojK6RFBZyt5a/oD437PK uk6WmKRy60cCLZeH/2f55olRgfdatyL8bdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdduiedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpefhjeduueelfeehuedt udefteejveegieeiueejueehfeektddtueeiieeitefhveenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Mar 2023 04:36:30 -0500 (EST) Message-ID: <0ad3543a-40d9-17f9-794f-75ea0106544a@enterprisedb.com> Date: Thu, 9 Mar 2023 10:36:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Move defaults toward ICU in 16? Content-Language: en-US To: Jeff Davis , Andres Freund , Bruce Momjian Cc: Tom Lane , Thomas Munro , Robert Haas , pgsql-hackers@postgresql.org References: <5ffeafe843d43a975f31479fbd211ab88404841b.camel@j-davis.com> <20230211020042.uthdgj72kp3xlqam@awork3.anarazel.de> <20230214175957.idkb7shsqzp5nbll@awork3.anarazel.de> <2a7feb71dbdcea31478b3974b8075982ac2326d2.camel@j-davis.com> <20230217170523.ujnq3qr75rolfrmu@awork3.anarazel.de> <20230217180909.oqxjgjudbsofn666@awork3.anarazel.de> <3bf6b5517033947c134ed1ba9a325179a608bfd1.camel@j-davis.com> <20230217205009.4sy4lmmqanbhjsgb@awork3.anarazel.de> <558f794c351fb73596e4b05d96f66d01d56b4a50.camel@j-davis.com> <438b15cf88c9c5cf0cf1c24bf7b835d6362a8e0c.camel@j-davis.com> <10bb0e53ba16e5865ea4d37575ee15d4df5dc043.camel@j-davis.com> From: Peter Eisentraut In-Reply-To: <10bb0e53ba16e5865ea4d37575ee15d4df5dc043.camel@j-davis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 08.03.23 06:55, Jeff Davis wrote: > On Fri, 2023-03-03 at 21:45 -0800, Jeff Davis wrote: >>>>    0002: update template0 in new cluster (as described above) > > I think 0002 is about ready and I plan to commit it soon unless someone > has more comments. 0002 seems fine to me. > I'm holding off on 0001 for now, because you objected. But I still > think 0001 is a good idea so I'd like to hear more before I withdraw > it. Let's come back to that after dealing with the other two. >>>>    0003: default initdb to use ICU > > This is also about ready, and I plan to commit this soon after 0002. This seems mostly ok to me. I have a few small comments. + default, ICU obtains the ICU locale from the ICU default collator. This seems to be a fancy way of saying, the default ICU locale will be set to something that approximates what you have set your operating system to. Which is what we want, I think. Can we say this in a more user-friendly way? +static void +check_icu_locale() should be check_icu_locale(void) + if (U_ICU_VERSION_MAJOR_NUM >= 54) + { If we're going to add more of these mysterious version checks, could we add a comment about what they are for? However, I suspect what this chunk is doing is some sort of canonicalization/language-tag conversion, which per the other thread, I have some questions about. How about for this patch, we skip this part and just do the else branch + icu_locale = pg_strdup(default_locale); and then put the canonicalization business into the canonicalization patch set?