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 1uSGXu-005Rw7-6w for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 14:47:18 +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 1uSGXr-00BzND-Pq for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 14:47:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSGXr-00BzN5-2j for pgsql-hackers@lists.postgresql.org; Thu, 19 Jun 2025 14:47:16 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uSGXp-002uCP-33 for pgsql-hackers@postgresql.org; Thu, 19 Jun 2025 14:47:14 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 415D5138040A; Thu, 19 Jun 2025 10:47:13 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 19 Jun 2025 10:47:13 -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:subject:subject:to:to; s=fm3; t=1750344433; x=1750430833; bh=ab1hbN6s+augW6gCmFaXU9hGjTwp4aTc iYN9QASjkrs=; b=ZhfNoxak6nk3qWQWNl/Nvnqq4121OD8W26qnNW70FglejUtA mt+FwQDXk9fe1+JuEF/qogIAod9P4OE1azWWuIG7RDqzccnBUVbRNYI2ONSs0Z8a auIHGuKWO8IQ79ashwSRj9YsUENHRNvQ1USiBYQcdAOkZb7OKb9+tjrlMkAo+EBe y/xPa8REwKhugt9WEJpHEe21mHDErISOIFInOp227cIDJfN2KXAd8qac0VnszLMF 3sip8nEtp7T+Cvb8lydfSKP7fcSSLG0A5JZRaGA/+2nPJKvqhUIOwLhkvkJ8yGfH mwP4ofC4O7/ourUn2r1N0AeRnnbZT+SYbQ7pyg== 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:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1750344433; x= 1750430833; bh=ab1hbN6s+augW6gCmFaXU9hGjTwp4aTciYN9QASjkrs=; b=H 7IyoDiel8tmQPoyk5R4RwrdCN0OgMdUNbUPtGtLLH4PXT+/hmEkrckreYDdSFN3J T4p0NdhP+473rTQZ2z0eyM0MpCqeHey3RUqr8WH36BINRrGV1Yg4zjg3DWi6dQ7T 9ECBKYHh5LDFCcK9uxfJHF/a8lyMEev/3K46+B+jFhPEmHePT0eLACju5CkAJbOw 9Lz0xRzGQAGmgBBnJYmf338ANoQNY1MXA0lx9UZ2GmeZHpzEyaAUZTuKBHfcWG2W 4wRhmV1mZPdzLwQC4H3ctJjCZqeoPh8uqhi/nDOkuoGefA2/FiQz/jnpTWCWyiJs FegyK3Mb1UX2fZih7uh7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdehkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpefrvghtvghrucfg ihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqnecugg ftrfgrthhtvghrnhepjefhveehtdetgfffhffhfeefgffghffflefgieeuueekhedvhedv feehffdvfeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopeeh pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehvihhksehpohhsthhgrhgvshhfrh hivghnughsrdhorhhgpdhrtghpthhtohepphhgshhqlhesjhdquggrvhhishdrtghomhdp rhgtphhtthhopehmrghilhesjhhovggtohhnfigrhidrtghomhdprhgtphhtthhopegsrg hrfihitghksehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghr shesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Jun 2025 10:47:11 -0400 (EDT) Message-ID: <3e0eaadb-8a1a-49de-8037-3c9123f99031@eisentraut.org> Date: Thu, 19 Jun 2025 16:47:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add CASEFOLD() function. To: Vik Fearing , Jeff Davis , Joe Conway , Ian Lawrence Barwick Cc: pgsql-hackers@postgresql.org References: <47716a78-eb0b-4728-8991-fc0d958a01c9@joeconway.com> <36f69fa9-db3f-44a1-8c8a-95ff09704a9c@postgresfriends.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <36f69fa9-db3f-44a1-8c8a-95ff09704a9c@postgresfriends.org> 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 17.06.25 17:37, Vik Fearing wrote: > For (which includes LOWER() and UPPER()), the text says in > Section 6.35 GR 7.e: > > > If the character set of is UTF8, UTF16, or UTF32, > then FR is replaced by >     Case: >         i) If the S IS NORMALIZED evaluates to True, > then NORMALIZE (FR) >         ii) Otherwise, FR. > > > Here, FR is the result of the function and S is its argument. > > > It does not appear to me that our LOWER and UPPER functions obey this > rule, so there is a valid argument that we should continue to ignore it. > Or, we can say that we have at least one of three compliant. The SQL standard also says in a few other places that normalization should be applied, and we do none of those, so this is probably not a reason to change CASEFOLD at this point.