Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qVT2Q-000HP3-KZ for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Aug 2023 08:34:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qVT2P-002ON9-BB for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Aug 2023 08:34:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qVT2N-002ON0-Ik for pgsql-hackers@lists.postgresql.org; Mon, 14 Aug 2023 08:34:57 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qVT2F-0003iN-Uu for pgsql-hackers@postgresql.org; Mon, 14 Aug 2023 08:34:55 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 776035C0101; Mon, 14 Aug 2023 04:34:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 14 Aug 2023 04:34:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1692002085; x=1692088485; bh=r4g7DSm4DKvMDqM0qEfG0HmDn Fr3bz4FuRoSD+GcXKA=; b=B6hYVYgC5bPhEgMjqDFr1Q68uFV31ktfDZeYrNsyx QmfkSbKJxWv0Fo+35+6ZA4i1BJB9BWXTko5Qhk9XKfEulG2v+i82VPfn33mS3jYW 8r4jxi+lc37CPqgw2Dmilor8Fa0dx9BYvkWSpWB3xTK/L3bJ/Yi6B76KM0sU8Q3M 4qZHDL9NTyAoljnv4Ew1OOj/Gsy0/AAQCmggbkompKuA1AHQqrKOenG1PZ8R7+4k h94EB9qEunH5vrRn+UF/Ntp1zOzubT8/H9plfCTt70+w5lA9nGm+C/EUJ39O1mAn wxOjOk4tr/r9inPmlPQARnDG6r/H4bjonMqOUzzyMBRPw== 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= 1692002085; x=1692088485; bh=r4g7DSm4DKvMDqM0qEfG0HmDnFr3bz4FuRo SD+GcXKA=; b=jfPqatYjweC3GlAXWOAP/Ayt725Rp7V2I7N0phRb1hniMwqmXFD ivojpNNphExQfF+piBAOh/3ChWX+1KWXWJNdqUpDLzKivsV0l7Sq4TpI8MSS20cX 5WTEEU9FDUl9yvmQBD3vmR633nkMReeNUoxTP4+e51MxC8idtQTyIi1SV+1CMikJ eATUm9I06tt/VbsPD2OJ744FV4RD2lUt3ft9u9T8BDA+uhPFUuswKPPe1GPjR2Tc 2YWh7VZ26l1hZyc+odbDygnkC/WBw48wvGzub3aM2N3dbiuucmoSe7GmBr8kg//o 4KYDxL9CwE/nsw5RYUmSWuxKdnvn0KfjvkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtgedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepheduhfetjedvleegleehtdeileektdegffdvjeetfeek tddvueetjeegueduffelnecuffhomhgrihhnpegrthhlrghsshhirghnrdhnvghtnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhes vghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Aug 2023 04:34:44 -0400 (EDT) Message-ID: Date: Mon, 14 Aug 2023 10:34:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: pgsql: Allow tailoring of ICU locales with custom rules Content-Language: en-US To: pgsql-hackers Cc: Jeff Davis , Amit Kapila References: <36a6e89689716c2ca1fae8adc8e84601a041121c.camel@j-davis.com> From: Peter Eisentraut In-Reply-To: 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 24.07.23 04:46, Amit Kapila wrote: > On Fri, Mar 10, 2023 at 3:24 PM Peter Eisentraut > wrote: >> >> On 08.03.23 21:57, Jeff Davis wrote: >> >>> * 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. > > This thread is listed on PostgreSQL 16 Open Items list. This is a > gentle reminder to see if there is a plan to move forward with respect > to open points. I have investigated this. My assessment is that how PostgreSQL interfaces with ICU is correct. Whether what ICU does is correct might be debatable. I have filed a bug with ICU about this: https://unicode-org.atlassian.net/browse/ICU-22456 , but there is no response yet. You can work around this by including the desired attributes in the rules string, for example create collation c3 (provider=icu, locale='und-u-ka-shifted-ks-level1', rules='[alternate shifted][strength 1]', deterministic=false); So I don't think there is anything we need to do here for PostgreSQL 16.