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 1pbk9W-0002Vw-1u for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 15:31: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 1pbk9U-0008SM-KQ for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 15:31:56 +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 1pbk9U-0008R9-6L for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 15:31:56 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pbk9N-0005ur-IF for pgsql-hackers@postgresql.org; Mon, 13 Mar 2023 15:31:54 +0000 Received: by mail-pj1-x102e.google.com with SMTP id h11-20020a17090a2ecb00b00237c740335cso12076685pjs.3 for ; Mon, 13 Mar 2023 08:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; t=1678721508; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=nwdUeZYZsZwV/W1Iu2r0Qs4NG7DfLGlD7AdVB/1AjFg=; b=azlHv2y0tzgwkqBRFqK9hicAm2iWVWGL9IPgk7GsOisJwyhBt6XaKbwVK1UOL0W2he CuJG0Nmn221btvlJKTTbCO8wdA7E7zaCmRDbMgR/3jY/CDULcMBMO1rPf+qTI+19hXqU Vxf6292ZtnJlRLC8i1+GmuI1iB2AZD23Sl5egKX5cbALaA7OjFWxLxbkrWp/fJcblNA7 DJw/Q9FIDq3/FYirorCqFqzX/2DGErkFJLjVhAcpz7XqZl3lKAyOFrcjX+Q1/toZ9GXE MfvqViyAZO+hsDUDQBuRc6Kcl2kVJZa2H1DRkW4yyeRBthfE1DyDu3Lfo+1Xm9Z5a+s3 PgdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678721508; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nwdUeZYZsZwV/W1Iu2r0Qs4NG7DfLGlD7AdVB/1AjFg=; b=CbO5nSsCff9xyiIGQCEchC32l3BCL8s5RXLVWyVMmn7cL970k22d807yp3ibhmmedF SYj/fcCyo/rjV0B1scBMrU0q7M2j0y+gwUZYi1tixNJizVyR7fDN/8MepeJ/Fxd0O5GJ PTXeywMdEWmSbZ06P1SdegGEhbcwbG5YjFNeogz2AAQ0p+D4sT5Jk++bWxFcfL/xIWWX ZpXBPk0Zrab7Etmn+XZBcci6Rt/nAtkDuy04NWKMcbkZCe0o9PlSyphCoL2M+ckyu9jp cAa6Yq7OdvId7pH+HCHNs9xwozh3Uj89HSGGfF3+I1CljzQkUQ9teXw+zAAEVQ2cciRU 0eiw== X-Gm-Message-State: AO0yUKVVlVs0bBk8j8xqvfsmx5dF8qbmzoCjcHe/feV/BsYgD+UovI2q otO4PWPOrNBqD9+9hs9RGeH68g== X-Google-Smtp-Source: AK7set/XwPZBNKXnwXsc3hzv6YvUD50chCHjIzGIS0s/tCjTGnzNHA2p3rDBCRBGYRON5D/xu86MGw== X-Received: by 2002:a17:902:da86:b0:19e:31a3:1a87 with SMTP id j6-20020a170902da8600b0019e31a31a87mr41373944plx.39.1678721508151; Mon, 13 Mar 2023 08:31:48 -0700 (PDT) Received: from jeff-laptop.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id li11-20020a170903294b00b0019908d2c85dsm48498plb.52.2023.03.13.08.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 08:31:47 -0700 (PDT) Message-ID: <0d7c4115e3dd3581cec125207cbd72cab677c238.camel@j-davis.com> Subject: Re: ICU locale validation / canonicalization From: Jeff Davis To: Peter Eisentraut , Robert Haas Cc: pgsql-hackers@postgresql.org Date: Mon, 13 Mar 2023 08:31:46 -0700 In-Reply-To: <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> 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> <857da8b1-2a1e-a2be-7df9-7f5e85a3bcb7@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2023-03-13 at 08:25 +0100, Peter Eisentraut wrote: > For clarification, I wasn't complaining about the notice, but about > the=20 > automatic conversion from old-style ICU locale ID to language tag. Canonicalization means that we pick one format, and automatically convert to it, right? > 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=20 > to do that parsing ourselves, but we don't have code to do the same > for=20 > language tags.=C2=A0 Therefore, if I understand this right, if we=20 > automatically convert ICU locale IDs to language tags, as shown > above,=20 > then we break support for such locales in those older ICU versions. Right. In versions 53 and earlier, and during pg_upgrade, we would just preserve the locale string as entered. Alternatively, we could canonicalize to the ICU format locale IDs. Or add something to parse out the attributes from a language tag. Regards, Jeff Davis