Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key

Álvaro Herrera <alvherre@kurilemu.de>

From: Alvaro Herrera <alvherre@kurilemu.de>
To: Matthew Gabeler-Lee <fastcat@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, Jehan-Guillaume de Rorthais <jgdr@dalibo.com>, pgsql-bugs@lists.postgresql.org, Christoph Berg <myon@debian.org>, PostgreSQL Developers <pgsql-hackers@postgresql.org>, Guillaume Lelarge <guillaume@lelarge.info>, Luca Vallisa <luca.vallisa@gmail.com>
Date: 2025-05-08T17:35:46Z
Lists: pgsql-bugs, pgsql-hackers
On 2025-May-08, Matthew Gabeler-Lee wrote:

> My earlier test case, and an adjusted version of it that is closer to
> my production application (notably adding ON DELETE CASCADE to the
> FK), now passes with 15.13.

Thank you, that's a relief to know.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Porque Kim no hacía nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Handle self-referencing FKs correctly in partitioned tables

  2. Restructure foreign key handling code for ATTACH/DETACH

  3. Fix self-referencing foreign keys with partitioned tables