Re: Use CASEFOLD() internally rather than LOWER()

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use CASEFOLD() internally rather than LOWER()
Date: 2026-01-14 19:53:42
Message-ID: 9e5b70b6a45166e42b1a878e260dd2e1c76be506.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2026-01-13 at 10:14 +0800, Chao Li wrote:
> 1 - 0001
> ```
> +SELECT U&'straße' ILIKE U&'STRASSE' COLLATE PG_C_UTF8;
> ```
>
> Do we want to added one more test:
> ```
> SELECT U&'straße' ILIKE U&'STRASSE' COLLATE PG_UNICODE_FAST;
>  ?column?
> ----------
>  t
> (1 row)
> ```
> Which tests the different behaviors against collations.

I am confused, doesn't the patch already have both of those tests for
both collations? What change are you suggesting?

> I initially thought to add test cases with different collations, but
> after debugging, I found that citext intentionally ignores specified
> collation.

Adding a test that's dependent on the database-wide collation is more
heavyweight because it needs to create a new database.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2026-01-14 20:03:01 Re: Remove redundant assignment in CreateWorkExprContext
Previous Message Kai Wagner 2026-01-14 19:52:57 Re: how to gate experimental features (SQL/PGQ)