May 2025

1 commit
Handle self-referencing FKs correctly in partitioned tables
2 May 2025Álvaro Herreramaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1REL_17_STABLE17.5REL_16_STABLE16.9REL_15_STABLE15.13REL_14_STABLE14.18REL_13_STABLE13.21Also in: Issue attaching a table to a partitioned table with an auto-referenced foreign key (written from the discussion, no matching patch)Also in: BUG #18156: Self-referential foreign key in partitioned table not enforced on deletes
LLM analysis, 99% surewritten from the discussion, no matching patch

The commit credits Luca Vallisa's report, reproduced in #3 and confirmed in #4, and fixes src/backend/commands/tablecmds.c by reordering foreign-key cloning and removing the self-reference exclusion, with regression coverage for enforcement. Neither this thread nor linked reports thread #47210 and thread #72168 contains patchsets; #5 confirms that the committed fix resolves this reproducer.

Credits across 1 commit

Reported by
Cheetah1
Guillaume Lelarge1
Luca Vallisa1
Committer
Alvaro Herrera1