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.96) (envelope-from ) id 1weNL6-004lNs-2i for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 01:32:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weNL5-005mOF-1l for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 01:32:39 +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.96) (envelope-from ) id 1weNHw-005iQb-3D for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2026 01:29:25 +0000 Received: from mail-dy1-x132d.google.com ([2607:f8b0:4864:20::132d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1weNHv-00000000qLp-0zrg for pgsql-hackers@postgresql.org; Tue, 30 Jun 2026 01:29:24 +0000 Received: by mail-dy1-x132d.google.com with SMTP id 5a478bee46e88-30bbe98c3f0so528320eec.0 for ; Mon, 29 Jun 2026 18:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1782782962; x=1783387762; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WxmVwuHe5rsB8Z8sNyr2UJQ5PmcNPv0HEiLhlyz8kbU=; b=JypmXaxL6JVzN3NbJAjwLWDHl5q3Eh8dlY4S+XNpPTjyoLC4b/VS3p9mnKFXwERyHi ayZXVJsjVLrO6/ecGZ9DyGIVqDarMcLfd3ZsKmJte3SSDXxU/cT5Ym2OSOTm2qt0lc9n g/Z+WeRz4da+Ho2GzHuMw645mYLyF9vhpBA/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782782962; x=1783387762; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WxmVwuHe5rsB8Z8sNyr2UJQ5PmcNPv0HEiLhlyz8kbU=; b=k/wdJQgfKOyiGfFbT8QxNVELIcXZWQ8+JnbZgmjJz6ddIPXGPv6jsUj0EBKy1LLmib 5okahGkMYb+BVxuwp45z1orfQRmSVWUfmEqWOlrOiaNaBeCbBDPVPEGKiM1aakzXq71f Vxve0CT7n9oLUSrrwluuNTgCq32Dd13MEU9LdicAtY4S3Nfb2fVU4RV8+2Vuew3qn8N8 CjxmJGIK2hww0SJQZnNmkIOvl/T1juINdvYbtGTRcaJY3802QdE6OX4859UNq7Idap2p eABmk4WyIKhs5llBBbm8YexwwE3B8gKIjM5JXKxxb3Cs0zxpAg3oHrU9PvUd8r5A2pBb Ea9g== X-Forwarded-Encrypted: i=1; AHgh+Rq2mZ9R9a0q3T6B996Xeg2NMQfNuS3xM7M/PnLeJQTO4v+cs7f9vf3RYp3onyYbTfEuEio9ecbc9b5cK9tl@postgresql.org X-Gm-Message-State: AOJu0YxDDpgwhKjX0YxX22VPEIzauwxMc94nPjTwx5YCuNIm73ziXxkv QhxtdyGKJDRsbOiHr9kY6CLICFe3VlPJVLPGKOCpM/O3srlub0xXx5oGpjwhBdjgf1JgtIJMEDA JUiqG6g== X-Gm-Gg: AfdE7ckuO8hi8yrZnrgtlxk/tCnSUJy+xBk47d6siXoR5FZNEhdRXj4mWM0yvqjgAGP 5gD4wiQBHfFw8+q8gznFT7ic/BM7saFXnr3f1OYUltxo3uJpSJBkeUN1dcPNUsqNMVe4V+bHQS7 PS04Av8fYNO/63+1yZJsOaOl43oHKqIgtZdhDLrYhjNjCok4l5JBmlWj8oWdxDPP+ftr7Se5Jpf qVFmdlpYPdZm6pDlA3YFtgtYK5zKKHTclS8+sEVNQiSNlgGTK8z9d/eHXy+Zi6e+5h84SX06RR8 Kw4nFu4J+1dMpagoKE51Ye+3sqyektH5D+LUO4z0Lw9/ewkUQ13d3+woDXHLjehRFx+cv/fhiyi B28e4ybGIeCWZPfUzWlgRtOhaDq9EloGu0gelStQcIEcwPxtdKE741ctg2LwOGS97i6qM4n0rKB 12N9Dox79b2rJmnk2fP6Q/ez608mqEIj8LQYOt0ztY6kVUn7Lnfm+p40N3fps= X-Received: by 2002:a05:7300:324d:b0:30e:be3f:e7f7 with SMTP id 5a478bee46e88-30ee128cd1bmr1114120eec.15.1782782961830; Mon, 29 Jun 2026 18:29:21 -0700 (PDT) Received: from rfd.leadboat.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30ee3264f52sm2071633eec.28.2026.06.29.18.29.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2026 18:29:21 -0700 (PDT) Date: Mon, 29 Jun 2026 18:29:19 -0700 From: Noah Misch To: Jeff Davis Cc: Andreas Karlsson , pgsql-hackers@postgresql.org, Peter Eisentraut Subject: Re: Collation & ctype method table, and extension hooks Message-ID: <20260630012919.78@rfd.leadboat.com> References: <247f18f3-09e5-480d-9222-9d0d9684995f@proxel.se> <78a1b434ff40510dc5aaabe986299a09f4da90cf.camel@j-davis.com> <4548a168-62cd-457b-8d06-9ba7b985c477@proxel.se> <7aa46d77b377428058403723440862d12a8a129a.camel@j-davis.com> <54771b2aa90f0c09085ce3f97d7f07ddce47da55.camel@j-davis.com> <679b689354bc4cd394bac850c7a03454d3412c0b.camel@j-davis.com> <1c1b254807813bb708802d5f766ea97e7f06b265.camel@j-davis.com> <5c3c03133ea4d4e575690360d891e4e0921780bd.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5c3c03133ea4d4e575690360d891e4e0921780bd.camel@j-davis.com> User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 11, 2025 at 10:49:17PM -0700, Jeff Davis wrote: > Attached v16. > I plan to commit this soon after branching. > Subject: [PATCH v16 1/4] Control ctype behavior internally with a method > table. > > Previously, pattern matching and case mapping behavior branched based > on the provider. > > Refactor to use a method table, which is less error-prone and easier > to hook. This became refactor commit 5a38104. In a UTF8 database, the commit changed the behavior of: SELECT 'café' ILIKE 'caf_' COLLATE "C"; That query reports true in v18, false in v19. I've copied Claude's whole review for the commit to https://docs.google.com/document/d/19_xKpKUQlY5N51qbfXyipXs3rqIYEC3qk5oaUDJ48YA/edit?tab=t.0. Two of its other findings sound potentially important, but I didn't verify them. nm