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 1pbcZC-0008Qu-T4 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 07:25:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbcZA-0002kt-P3 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 07:25:56 +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 1pbcZA-0002kk-Es for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 07:25:56 +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 1pbcZ7-0003kf-19 for pgsql-hackers@postgresql.org; Mon, 13 Mar 2023 07:25:55 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 9BF6D2B066BA; Mon, 13 Mar 2023 03:25:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 13 Mar 2023 03:25:49 -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= 1678692349; x=1678699549; bh=s0hwg2s2yLJvvwiwTmpWUZ4EbPu090bdGQD oD9YnZAs=; b=DFtklxc83FKn+WrJQtCACArTro02x4r7R6mQh7V4YDt/bCbQ01o dFzgLC9J3Scwk98D309VGi4TZVG5BI/dB3ZfVwTPz89adSAuXFOm11o7gyONvhEa b5SPOZtgNZsOOeo3X8ud4kxr+XLQpfy38zu9+8Y1S877zhN2uQJXJEFN9ZyvEPLr n1kG7zEf+cjvpgK1BkYEGbegZ0XoocDKHWoW2SaFIDUtszFLQFGbga//5GHL9r6H 1/5lQ+2ToMaX/she9imFrWRYj5QJ2GXb/T2BYmlCB8TRW0gawaauY/2wdxXaOLPt NHA9jE8AWfUtNxJqyYii45KrJ3mf7S1KmeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvfedguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhephfejudeuleefheeu tddufeetjeevgeeiieeujeeuheefkedttdeuieeiieethfevnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Mar 2023 03:25:48 -0400 (EDT) Message-ID: <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> Date: Mon, 13 Mar 2023 08:25:46 +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: ICU locale validation / canonicalization Content-Language: en-US To: Jeff Davis , Robert Haas Cc: pgsql-hackers@postgresql.org References: <11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com> <33acfc3a772224d668042bd2cbef88e91704ce25.camel@j-davis.com> <6f32de82-88e2-480a-8421-07add8f5dee5@enterprisedb.com> <8c7af6820aed94dc7bc259d2aa7f9663518e6137.camel@j-davis.com> <4eebea80f528b1b5e381d6e834497bd6983e4e93.camel@j-davis.com> <899ab44a-4307-064f-0945-412723d57c02@enterprisedb.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 09.03.23 21:17, Jeff Davis wrote: >> Personally, I'm not on board with this behavior: >> >> => CREATE COLLATION test (provider = icu, locale = >> 'de@collation=phonebook'); >> NOTICE:  00000: using language tag "de-u-co-phonebk" for locale >> "de@collation=phonebook" >> >> I mean, maybe that is a thing we want to do somehow sometime, to >> migrate >> people to the "new" spellings, but the old ones aren't wrong. > > I see what you mean; I'm not sure the best thing to do here. We are > adjusting the string passed by the user, and it feels like some users > might want to know that. It's a NOTICE, not a WARNING, so it's not > meant to imply that it's wrong. For clarification, I wasn't complaining about the notice, but about the automatic conversion from old-style ICU locale ID to language tag. >> It also doesn't appear to address >> how to handle ICU before version 54. > > Do you have a specific concern here? What we had discussed a while ago in one of these threads is that ICU before version 54 do not support keyword lists, and we have custom code to do that parsing ourselves, but we don't have code to do the same for language tags. Therefore, if I understand this right, if we automatically convert ICU locale IDs to language tags, as shown above, then we break support for such locales in those older ICU versions.