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 1nVIHc-0002PU-Re for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2022 19:29:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nVIHb-0001ik-Hw for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2022 19:29:07 +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 1nVIHa-0001iZ-G1 for pgsql-hackers@lists.postgresql.org; Fri, 18 Mar 2022 19:29:07 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVIHW-0006GX-LZ for pgsql-hackers@lists.postgresql.org; Fri, 18 Mar 2022 19:29:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9E9535C013A; Fri, 18 Mar 2022 15:29:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 18 Mar 2022 15:29:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date: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=fm3; bh=nz6DeGbToGKQkvRxpeng30zgBgb+ymFk/f11A8I5H ls=; b=MeSpifxwszAO2OIAU6RteIBO+UTEv8vCCRb+oOJaP1Bi9Ob4ijFdSgxzG JHHYuWzcXWpybdJiZXBVs7kN2f/dPCbftNQUl49oN5jafJfy1nAI6IAM5PrLlIo2 gN+50iOZIQLn7gRElNVFEdYli7h4ZVY50b63Bru7eOqrIWHXjoQFe4JopakT0fsd LS3xnNFu6WbZcx7KXTYdFNQSnCRhRRbmQi65J1UbUvC6W/+P65++nJqlO4g98SHd 0VR/qg8TwVySq4PGEW8jXYoED/Gw70UdWOZRaLIV5NP9IIwezNNJxQVwW+r3YC8n Qb1uO0Y44JHgTXoGwZWa9NmpuFKSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudefiedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveev udelueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Mar 2022 15:28:59 -0400 (EDT) Message-ID: <7960418a-b5ac-8a53-bf45-dec2b48e01e9@enterprisedb.com> Date: Fri, 18 Mar 2022 20:28:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: pgsql: Add option to use ICU as global locale provider Content-Language: en-US To: Julien Rouhaud , Thomas Munro Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org References: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> <20220318063648.4ja6rxlyzvc3viio@jrouhaud> <20220318074051.n46mkwp2zkbxeesf@jrouhaud> <20220318092749.363m4uv6rq24lctz@jrouhaud> From: Peter Eisentraut In-Reply-To: <20220318092749.363m4uv6rq24lctz@jrouhaud> 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 On 18.03.22 10:27, Julien Rouhaud wrote: > I'm attaching a patch that fixes both issues for me with ICU 50. Note that > there's already a test that would have failed for CREATE DATABASE if initdb > tests didn't fail first, so no new test needed. > > I ended up copy/pasting icu_set_collation_attributes() in initdb.c. There > shouldn't be new attributes added in old ICU versions, and there are enough > differences to make it work in the frontend that it didn't seems worth to have > a single function. Another option is that we just don't do the check in initdb. As the tests show, you will then get an error from the backend call, so it's really just a question of when the error is reported. Why does your patch introduce a function check_icu_locale() that is only called once? Did you have further plans for that?