Re: [18] Policy on IMMUTABLE functions and Unicode updates - Mailing list pgsql-hackers

From Jeremy Schneider
Subject Re: [18] Policy on IMMUTABLE functions and Unicode updates
Date
Msg-id CA+fnDAa6tNgj_C3mqPgyURPBQprQwwho4Km4xVeQ+SSaqrg5Ow@mail.gmail.com
Whole thread Raw
In response to Re: [18] Policy on IMMUTABLE functions and Unicode updates  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [18] Policy on IMMUTABLE functions and Unicode updates
List pgsql-hackers
On Wed, Jul 24, 2024 at 12:47 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Jul 24, 2024 at 1:45 PM Jeff Davis <pgsql@j-davis.com> wrote:
> There's a qualitative difference between a collation update which can
> break your PKs and FKs, and a ctype update which definitely will not.

I don't think that's true. All you need is a unique index on UPPER(somecol).

I doubt it’s common to have unique on upper()

But non-unique indexes for case insensitive searches will be more common. Historically this is the most common way people did case insensitive on oracle.

Changing ctype would mean these queries can return wrong results

The impact would be similar to the critical problem TripAdvisor hit in 2014 with their read replicas, in the Postgres email thread I linked above

-Jeremy

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Regarding t_cid in Neon heap WAL records
Next
From: Robert Haas
Date:
Subject: Re: [18] Policy on IMMUTABLE functions and Unicode updates