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 1uSI0v-005lM6-3W for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 16:21:21 +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 1uSI0t-00CkAe-6W for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 16:21:19 +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 1uSI0s-00CkAW-QP for pgsql-hackers@lists.postgresql.org; Thu, 19 Jun 2025 16:21:19 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uSI0r-002v2p-1u for pgsql-hackers@postgresql.org; Thu, 19 Jun 2025 16:21:18 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 60D52432D1; Thu, 19 Jun 2025 16:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgresfriends.org; s=gm1; t=1750350071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kMlwB0WauIo3VBCxxuWHVcG3jeQ70m2jqHyKa5AC6Mg=; b=AZR8NZmJyOReRIdpCHEfp+hXpgRPG/lrm498WqCocs3zHQFjCRTBRnTFdrMkC7bqwpvD54 fqkG3u9Z2+HXpr3TunWs6ndAHveczH0p+fhCLfxEpGN/+rKaDNn8Roamj+gmwWDCoePS/L 8miL2Mi4Bhsrq2uszfXchftypfL66+qiSGc1Vhy8jnThgLJIWQmxxAFh4yfyHPTQ8Mh+U+ n2r+MCWvAw1HIKZLVUegS0oRmeeAws8vcHTfJmqDH5u5diFVOWwtQyj4jDXFgvjbw3C3hU 2wXSJzIi/p1um3t8D4FwKRV6WoyeA8N4CdTi4CKSf/AZUtjrxnDXLMOjTvl11g== Message-ID: <7ee0ad52-650b-472f-82f4-27d2cf1a0887@postgresfriends.org> Date: Thu, 19 Jun 2025 18:21:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add CASEFOLD() function. To: Peter Eisentraut , 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> <3e0eaadb-8a1a-49de-8037-3c9123f99031@eisentraut.org> Content-Language: en-US From: Vik Fearing In-Reply-To: <3e0eaadb-8a1a-49de-8037-3c9123f99031@eisentraut.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdehleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepgghikhcuhfgvrghrihhnghcuoehvihhksehpohhsthhgrhgvshhfrhhivghnughsrdhorhhgqeenucggtffrrghtthgvrhhnpedutdevfeelgedvuddtjefhhfelhefhveehieelhfegtedtuefhtdffgedvgfetffenucfkphepudelfedrfedvrdduvdeirdduieeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelfedrfedvrdduvdeirdduieeipdhhvghloheplgdutddrudefgedruddthedrkeekngdpmhgrihhlfhhrohhmpehvihhksehpohhsthhgrhgvshhfrhhivghnughsrdhorhhgpdhnsggprhgtphhtthhopeehpdhrtghpthhtohepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhrtghpthhtohepphhgshhqlhesjhdquggrvhhishdrtghomhdprhgtphhtthhopehmrghilhesjhhovggtohhnfigrhidrtghomhdprhgtphhtthhopegsrghrfihitghksehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-GND-Sasl: vik@postgresfriends.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 19/06/2025 16:47, Peter Eisentraut wrote: > 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. > Works for me. -- Vik Fearing.