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 1ph31Y-0005hI-BC for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 06:41:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ph31W-00023X-Rp for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 06:41:38 +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 1ph31V-00023N-OS for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 06:41:38 +0000 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ph31N-0001dL-QN for pgsql-hackers@postgresql.org; Tue, 28 Mar 2023 06:41:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id F35822B0671F; Tue, 28 Mar 2023 02:41:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 28 Mar 2023 02:41:27 -0400 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=fm2; t= 1679985686; x=1679992886; bh=iqbjZkjfB+XEvZN5K5gyfTrK5RUUc0ZR/o1 anarAdno=; b=j6BO6JHPNkLur7eOw9QSkwl0IU3qwGBQN29xlAJt+X23JzCLwn8 NbqCZ+Cetm0WffUYqgdr6DysEkQEHfNqy/dholw1Y4PLcQR82Ch4Y24H1x0BG4BF DKoANCIAHzUI8xJce1sDGIvfl0pyiucM9TpDuIdcp17eIye0BlBMUfzmsd780Z1R J+F5+HgiWd+182L7xQScFrXx9oa2cuQ/253OfCR3qVy0D5HDUNGgAkku8EDkp50k YfleJRbf8IzVnp6HR/ssp/22Z1hCgRFU3+ijRiNFKAZnK+mlVCxwBLo5WZqsBL5e 96tC7haUOF/3wK2r4caUWv30/6jAENI4b0Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehfedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Mar 2023 02:41:25 -0400 (EDT) Message-ID: <3e45a760-a7f8-80af-e4b0-be91427359d3@enterprisedb.com> Date: Tue, 28 Mar 2023 08:41:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: ICU locale validation / canonicalization Content-Language: en-US To: Jeff Davis , Robert Haas Cc: pgsql-hackers@postgresql.org References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com> <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com> <1569fa4c-aded-57c4-eb07-3bcf03c5e423@enterprisedb.com> <60da0cecfb512a78b8666b31631a636215d8ce73.camel@j-davis.com> <20a2f13f652e6252531a449508e8a8be31d7664f.camel@j-davis.com> <7d77abd7767baaf30445e83415b428aa3eb54631.camel@j-davis.com> <9afa6dbe0d31053ad265aeba488fde784fd5b7ab.camel@j-davis.com> <7ee414ad-deb5-1144-8a0e-b34ae3b71cd5@enterprisedb.com> <4efdd7bdf9c811e1a32b8d10524bae8040367068.camel@j-davis.com> <6880701fd5cd5183ad7ff3a73d5c9291d6c2e331.camel@j-davis.com> <04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com> <2a9013df9a197aa5eb2d85b5f7ec0c5a726b6a2e.camel@j-davis.com> From: Peter Eisentraut In-Reply-To: <2a9013df9a197aa5eb2d85b5f7ec0c5a726b6a2e.camel@j-davis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk [PATCH v9 1/5] Fix error inconsistency in older ICU versions. ok [PATCH v9 2/5] initdb: replace check_icu_locale() with default_icu_locale(). I would keep the #ifdef USE_ICU inside the lower-level function default_icu_locale(), like it was before, so that the higher-level setlocales() doesn't need to know about it. Otherwise ok. [PATCH v9 3/5] initdb: emit message when using default ICU locale. ok [PATCH v9 4/5] Validate ICU locales. Also here, let's keep the #ifdef USE_ICU in the lower-level function and move more logic in there. Otherwise you have to repeat various things in DefineCollation() and createdb(). I'm not sure we need the IsBinaryUpgrade checks. Users can set icu_validation_level on the target instance if they don't want that.