Re: Use correct collation in pg_trgm

From: David Geier <geidav(dot)pg(at)gmail(dot)com>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Kirill Reshke <reshkekirill(at)gmail(dot)com>
Subject: Re: Use correct collation in pg_trgm
Date: 2026-01-23 15:10:22
Message-ID: 1981b5f0-7d06-4911-a231-23bbb6bf504c@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Thanks for reviewing.

On 22.01.2026 07:32, Zsolt Parragi wrote:
> Hello!
>
> The patch is simple and it does what it says it does, I verified the
> difference in behavior with/without it.

While reading through [1] I realized that the word boundary detection
also uses the wrong collation. Patch 0002 fixes that.

> I think the test case included in the email should be part of the
> patch, maybe as a new file contrib/pg_trgm/sql/pg_trgm_collation.sql?
> It also needs a proper commit message, and seems like the affected
> indexes will need a REINDEX after this fix.

- I've added tests to 0001 and 0002 based on what each commit fixes.
- I've improved the commit messages.

Looking at [2], it seems like we don't include release note changes in
bug fix commits but rather collect them retroactively before cutting the
release.

[1]
https://www.postgresql.org/message-id/f30299bf-ad8e-4125-bf80-e0a8663991b6%40eisentraut.org

[2]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fb1a18810f0

--
David Geier

Attachment Content-Type Size
v2-0002-Use-correct-collation-for-finding-word-boundaries.patch text/x-patch 8.9 KB
v2-0001-Use-correct-collation-for-lowercasing.patch text/x-patch 18.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Álvaro Herrera 2026-01-23 14:53:13 Re: Time to drop RADIUS support?