Re: Foreign key validation failure in 18beta1

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Amul Sul <sulamul(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tender Wang <tndrwang(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: Foreign key validation failure in 18beta1
Date: 2025-06-04 03:18:41
Message-ID: CACJufxE0KRLtrapdQOYw1TW+BbfcbLrng7S7fzDz+M_T1RDknw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 3, 2025 at 12:14 PM Amul Sul <sulamul(at)gmail(dot)com> wrote:
> >
>
> I found a third approach that requires only a few changes. The key
> idea is to determine the root referenced table and pass it to
> QueueFKConstraintValidation(). We would then enqueue phase 3
> validation only if the constraint tuple’s confrelid matches that root
> table -- similar to what is doing in ATExecAlterConstrEnforceability().
>
> This would also ensure that the logic for adding/skipping phase 3
> validation is consistent in both places.
>
indeed!

v7 is way more intuitive compared with v5, v6.
The commit message also looks fine.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2025-06-04 03:22:32 [19] Proposal: function markers to indicate collation/ctype sensitivity
Previous Message Japin Li 2025-06-04 03:12:07 Re: Encapsulate io_uring process count calculation