| From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Use CASEFOLD() internally rather than LOWER() |
| Date: | 2026-01-12 18:22:20 |
| Message-ID: | 64d7949bad90545f981ac7513fb0b4954daca2c9.camel@j-davis.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
There are a number of internal callers of LOWER(), and conceptually
those should all be using CASEFOLD(). Patches attached.
I'm not sure if we want the citext patch -- it would require REINDEX of
all existing citext indexes after upgrade, and there's already a
documented tip ("Consider using nondeterministic collations...), so
perhaps it's a legacy extension anyway.
It would be nice to make the tsearch change this release, as there are
already changes that could require a reindex.
I didn't change pg_trgm yet, because I think that we have to change the
regex machinery to be aware of more than two case variants first (and
potentially increasing string lengths, too).
Regards,
Jeff Davis
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-ILIKE-use-CASEFOLD-rather-than-LOWER.patch | text/x-patch | 4.0 KB |
| v1-0002-citext-use-CASEFOLD-rather-than-LOWER.patch | text/x-patch | 3.8 KB |
| v1-0003-dict_xsyn-use-CASEFOLD-rather-than-LOWER.patch | text/x-patch | 1.1 KB |
| v1-0004-tsearch-use-CASEFOLD-rather-than-LOWER.patch | text/x-patch | 5.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mihail Nikalayeu | 2026-01-12 18:54:56 | Re: Adding REPACK [concurrently] |
| Previous Message | Mihail Nikalayeu | 2026-01-12 18:20:35 | Re: Adding REPACK [concurrently] |