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 1paZSC-0007CN-O6 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2023 09:54:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1paZSA-0000fk-7c for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2023 09:54:22 +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 1paZS9-0000fb-Br for pgsql-hackers@lists.postgresql.org; Fri, 10 Mar 2023 09:54:21 +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 1paZS5-0008N6-L5 for pgsql-hackers@postgresql.org; Fri, 10 Mar 2023 09:54:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id CA7265820DF; Fri, 10 Mar 2023 04:54:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 10 Mar 2023 04:54:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1678442055; x= 1678449255; bh=j9pAftuBFnJGfEORTGn3k2QRk3QRoZq957O/8GUcsJc=; b=g 9TDeP2/sa8aNvNiVipFak0iy/Ggsn7uAHTAuE8mceCOJHZCReWdnwrBkT+lDrd/3 Q/9Ru26k/qHJc8VmvYcSHRyyrMa+ldG1T48wuv0mXpGD3taZMSL24FZZQAVltwkU Tl1NLPK934XQ1GR2NXupJEXykBAp5bs+Ly1c0tL1VPrfDgi2z0DyB+GUdx/H3hst jRtjYh59ii7Bshbej3abc5kdRkRrDAR9BOnKFrue6iwqp4OQX6zOj55/lkj5Yg1U Pu2AQ+1C5rXS6Rso0whmIEdU7gcFYRWE+JDfiOCSCtg/zl6e3IqlYBsrekVr3aUO XzCERhMWPdhqHyBEH/8uQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddukedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghr rdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhmqeenucggtffrrg htthgvrhhnpeefjeegheetuefhveevudelueeftdejteeiffetvdduhfdtieefgfeutedt veeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Mar 2023 04:54:15 -0500 (EST) Message-ID: Date: Fri, 10 Mar 2023 10:54:14 +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: pgsql: Allow tailoring of ICU locales with custom rules Content-Language: en-US To: Jeff Davis , pgsql-hackers References: <36a6e89689716c2ca1fae8adc8e84601a041121c.camel@j-davis.com> From: Peter Eisentraut In-Reply-To: <36a6e89689716c2ca1fae8adc8e84601a041121c.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 On 08.03.23 21:57, Jeff Davis wrote: > On Wed, 2023-03-08 at 16:03 +0000, Peter Eisentraut wrote: >> Allow tailoring of ICU locales with custom rules > > Late review: > > * Should throw error when provider != icu and rules != NULL I have fixed that. > * Explain what the example means. By itself, users might get confused > wondering why someone would want to do that. > > * Also consider a more practical example? I have added a more practical example with explanation. > * It appears rules IS NULL behaves differently from rules=''. Is that > desired? For instance: > create collation c1(provider=icu, > locale='und-u-ka-shifted-ks-level1', > deterministic=false); > create collation c2(provider=icu, > locale='und-u-ka-shifted-ks-level1', > rules='', > deterministic=false); > select 'a b' collate c1 = 'ab' collate c1; -- true > select 'a b' collate c2 = 'ab' collate c2; -- false I'm puzzled by this. The general behavior is, extract the rules of the original locale, append the custom rules, use that. If the custom rules are the empty string, that should match using the original rules untouched. Needs further investigation. > * Can you document the interaction between locale keywords > ("@colStrength=primary") and a rule like '[strength 2]'? I'll look into that.