public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Davis <[email protected]>
To: Robert Haas <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: [email protected]
Cc: Daniel Verite <[email protected]>
Cc: Noah Misch <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Jeremy Schneider <[email protected]>
Subject: Re: [18] Policy on IMMUTABLE functions and Unicode updates
Date: Wed, 24 Jul 2024 12:12:34 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoZDHyWX7Ma7A388=n0hurPtD81eKXHNYQWKeKjGJYgQgA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+TgmoZRpOFVmQWKEXHdcKj9AFLbXT5ouwtXa58J=3ydLP00ZQ@mail.gmail.com>
	<[email protected]>
	<CA+TgmobyY5mqREzCAGSJwOV4V6avMVDcAxjHkVLHpeNyEJgZJQ@mail.gmail.com>
	<[email protected]>
	<CA+Tgmob6t-=Z-KtYA11AsiYSxdwrHNgi3ijn6cwtpdptA1-3PA@mail.gmail.com>
	<[email protected]>
	<CA+TgmoZDHyWX7Ma7A388=n0hurPtD81eKXHNYQWKeKjGJYgQgA@mail.gmail.com>

On Wed, 2024-07-24 at 14:47 -0400, Robert Haas wrote:
> On Wed, Jul 24, 2024 at 1:45 PM Jeff Davis <[email protected]> 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).

Primary keys are on plain column references, not expressions; and don't
support WHERE clauses, so I don't see how a ctype update would affect a
PK.

In any case, you are correct that Unicode updates could put some
constraints at risk, including unique indexes, CHECK, and partition
constraints. But someone has to actually use one of the affected
functions somewhere, and that's the main distinction that I'm trying to
draw.

The reason why collation is qualitatively a much bigger problem is
because there's no obvious indication that you are doing anything
related to collation at all. A very plain "CREATE TABLE x(t text
PRIMARY KEY)" is at risk.

Regards,
	Jeff Davis







view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [18] Policy on IMMUTABLE functions and Unicode updates
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox