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 1rniep-00EhZE-59 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Mar 2024 17:26:19 +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 1rnien-005s7o-O9 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Mar 2024 17:26:18 +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 1rnien-005s7X-8E for pgsql-hackers@lists.postgresql.org; Fri, 22 Mar 2024 17:26:17 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rniek-005wcU-Dq for pgsql-hackers@postgresql.org; Fri, 22 Mar 2024 17:26:17 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6e6cb0f782bso1764740b3a.1 for ; Fri, 22 Mar 2024 10:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1711128372; x=1711733172; darn=postgresql.org; 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=ohrHGxepDU6y73urNWdDjGq3WUNJ7zk0/+QPHSg52VA=; b=CCoHDky2tZUZ0aV2+XU9Zo+711t4t+fVLd+hzjZJsqhRV1rw0iGG2o0MmAkGduSlvO C072XbYpsYNUSvEgi9bnsHbqOltLTdg7rLQUFkPwiny5udvqmZaczQFACOP55dmmM5Fs QMvj/wF2dFkCj5gds0g1Z2uRxMKdgQt2O3eCtrdPzEdWdxMBgH3haYqcSZrYOUnPxQ/u 3Bba28U4r9jh/yGIobJzHEBbdt6Bnqqs32OMxHzD8wefhzxdgKKxGE8xVMdYQ9VAo3hN Ej3+AHL6SoeqEE8v1ylK6OQry2F71/Sw9UW7KXEe9jOJNcWNBwiTuLhgdQumDgmt3Lfa e2kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711128372; x=1711733172; 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=ohrHGxepDU6y73urNWdDjGq3WUNJ7zk0/+QPHSg52VA=; b=U0zXOEfqioP9Y4tuXbiMrXzOXVfWRaQjltdidwmyDlz5mqJOAB/9C2za9+WCp21AgR BtzlaxvGLLyRnNE5mdSYU7jIFlfG+N7hMjmTVzADBYHoRp2zRbIJ+i1asUfcFHQWnPWi vOgUY+TU5m18izxBD4bKreUL1kOawdu6SPFSNAJoJHNAtumRScBpHRIIle07wGWgKmIs Izj3+u3e/rg3oqX7DomY+K5Q08kb5LV0cl8Ec4kQWWEP9FfkwtAkIiIeXnlbJNA4NFg8 UJ9vMQzGp2ksI8fsTxK/jB+s7Kg5L7ri+GoVlP0/dh/QsnifNXpQiXyptAQv33JsPSCH 0V7g== X-Forwarded-Encrypted: i=1; AJvYcCUW8sXgFukr2RTYUlmVMoBEB6W3eC8/dD3MBioeo8qvUBh8hgMkLjzHJszzwhxaWDWJFf/30ISG6ggfLrvuf1x+/WIE8kqBTMmuF68+ X-Gm-Message-State: AOJu0YzA3pFF6DFUZ4dXW4fV1bLSsk35pmtyqNsLL7p3iZcKWxUet3Ca T9f2UOXmv9+WltsEy0li03Wp5K+HiJqPMARy9eZt9Kd3xbB+630GkgVT9YL0BA== X-Google-Smtp-Source: AGHT+IFfsU2khrn/i9QMNYNdb/mu02ZsyQqmmdtbkwZDu8qiMx7neBoPd4L8pKDIeGSHDXt0gQyZXg== X-Received: by 2002:a05:6a00:84b:b0:6e7:3204:d602 with SMTP id q11-20020a056a00084b00b006e73204d602mr455102pfk.10.1711128372119; Fri, 22 Mar 2024 10:26:12 -0700 (PDT) Received: from [172.18.10.46] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id z4-20020aa791c4000000b006e6c5cbfff7sm1898650pfa.169.2024.03.22.10.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 10:26:11 -0700 (PDT) Message-ID: <69f832595838e40c1b071a5e750665190ba301bf.camel@j-davis.com> Subject: Re: Built-in CTYPE provider From: Jeff Davis To: Peter Eisentraut , Daniel Verite Cc: Robert Haas , Jeremy Schneider , pgsql-hackers@postgresql.org Date: Fri, 22 Mar 2024 10:26:10 -0700 In-Reply-To: <49f18979-bef5-4cf0-bf3d-8a5ed323f470@eisentraut.org> References: <6f3e94c0-f174-4380-9b69-072f8a838881@manitou-mail.org> <12e4f6a78403b33c303c20e44976f891d879be09.camel@j-davis.com> <612987b5-38fa-44c6-8b78-c0be5a177a70@eisentraut.org> <2692039df6b0cac20c5e488fa0209e8958c5fedb.camel@j-davis.com> <27bb0e52-801d-4f73-a0a4-02cfdd4a9ada@eisentraut.org> <4a69d067374d2f6bfb66f5bfb2ab9a020493d49f.camel@j-davis.com> <3bc653b5d562ae9e2838b11cb696816c328a489a.camel@j-davis.com> <163f4e2190cdf67f67016044e503c5004547e5a9.camel@j-davis.com> <6bdb98e68b2b05aa71f7f934e227738eac84ecee.camel@j-davis.com> <19b34a70-f5cf-4faf-88dc-917db44ed48d@eisentraut.org> <846a7e1fa2024918b58ff7583523a2f3de9a11b4.camel@j-davis.com> <3117d30aa911b408b90420f4f280fa0c3b5851be.camel@j-davis.com> <4135cf11-206d-40ed-96c0-9363c1232379@eisentraut.org> <7451f81ba0cb512222ab759de8ca1cffe44e9acb.camel@j-davis.com> <1f309153-8198-4efa-86dd-8c304ec0040c@eisentraut.org> <49f18979-bef5-4cf0-bf3d-8a5ed323f470@eisentraut.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2024-03-22 at 15:51 +0100, Peter Eisentraut wrote: > I think this might be too big of a compatibility break.=C2=A0 So far,=20 > initcap('123abc') has always returned '123abc'.=C2=A0 If the new collatio= n > returns '123Abc' now, then that's quite a change.=C2=A0 These are not som= e > obscure Unicode special case characters, after all. It's a new collation, so I'm not sure it's a compatibility break. But you are right that it is against documentation and expectations for INITCAP(). > What is the ICU configuration incantation for this?=C2=A0 Maybe we could > have=20 > the builtin provider understand some of that, too. https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/stringoptions_8h.ht= ml#a4975f537b9960f0330b233061ef0608d https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/stringoptions_8h.ht= ml#afc65fa226cac9b8eeef0e877b8a7744e > Or we should create a function separate from initcap. If we create a new function, that also gives us the opportunity to accept optional arguments to control the behavior rather than relying on collation for every decision. Regards, Jeff Davis