Re: Foreign key validation failure in 18beta1 - Mailing list pgsql-hackers

From jian he
Subject Re: Foreign key validation failure in 18beta1
Date
Msg-id CACJufxHdhON_NO29jbKYgPBY=zPEpqbQNA-M4Cs3DBp21SxsaA@mail.gmail.com
Whole thread Raw
In response to Re: Foreign key validation failure in 18beta1  (Tender Wang <tndrwang@gmail.com>)
List pgsql-hackers
On Fri, May 30, 2025 at 6:32 PM Amul Sul <sulamul@gmail.com> wrote:
>
>
> Kindly take a look at the attached version. I've also added the tests.
> Thanks for your script -- all tests are passing with this patch.
>

hi.

+ * Note that validation should be performed against the referencing
+ * root table only, not its child partitions. See
+ * QueueFKConstraintValidation() for more details.
  */
        if (rel->rd_rel->relkind == RELKIND_RELATION &&
            currcon->confrelid == pkrelid)
        {
            AlteredTableInfo *tab;
            NewConstraint *newcon;
            newcon = (NewConstraint *) palloc0(sizeof(NewConstraint));
            ....
        }

in the comments "referencing" should be "referenced"?

other than that, it looks good.



pgsql-hackers by date:

Previous
From: Daniil Davydov
Date:
Subject: Re: Speedup truncations of temporary relation forks
Next
From: jian he
Date:
Subject: CREATE DOMAIN create two not null constraints