Re: altering a column's collation leaves an invalid foreign key

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: altering a column's collation leaves an invalid foreign key
Date: 2024-09-04 06:54:00
Message-ID: CACJufxFy9EEpqv3Q3XTM3aAQ2UbzbyavLzN=WT1yXC7JcZqzhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 3, 2024 at 5:41 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
>
> I like this patch version (v4). It's the simplest, probably also
> easiest to backpatch.
>

I am actually confused.
In this email thread [1], I listed 3 corn cases.
I thought all these 3 corner cases should not be allowed.
but V4 didn't solve these corner case issues.
what do you think of their corner case, should it be allowed?

Anyway, I thought these corner cases should not be allowed to happen,
so I made sure PK, FK ties related collation were deterministic.
PK can have indeterministic collation as long as it does not interact with FK.

[1] https://www.postgresql.org/message-id/CACJufxEW6OMBqt8cbr%3D3Jt%2B%2BZd_SL-4YDjfk7Q7DhGKiSLcu4g%40mail.gmail.com

Attachment Content-Type Size
v5-0001-ensure-PK-FK-ties-related-collation-indeterminist.patch text/x-patch 14.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-09-04 07:21:10 Re: BUG #18598: AddressSanitizer detects use after free inside json_unique_hash_match()
Previous Message shveta malik 2024-09-04 06:53:11 Commit Timestamp and LSN Inversion issue