Re: ALTER CONSTRAINT on a partitioned FK isn't working
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2020-12-07T23:34:14Z
Lists: pgsql-bugs
On 2020-Dec-07, Tom Lane wrote: > then everything behaves as expected. So something is broken > about propagating deferred-ness to partition triggers in an > ALTER CONSTRAINT. Oddly, it *looks* like it worked if you > examine the child tables with "\d+". I surmise that ALTER CONSTRAINT > fixes whatever catalog fields psql looks at, but there's some other > fields that also need to be updated and aren't being. Yeah, this query shows that the tgdeferrable and tginitdeferred columns ought to be dropped: select tgname, tgdeferrable, tginitdeferred from pg_trigger; These are all 'true' when the constraint is created correctly, and false when changed by ALTER CONSTRAINT. Let me see about fixing that ...
Commits
-
Have ALTER CONSTRAINT recurse on partitioned tables
- 6f70d7ca1d19 14.0 landed
- abce26c9eb95 12.7 landed
- a25b98d2cf38 11.12 landed
- 923c13520f1b 13.3 landed
-
Fix OID passed to object-alter hook during ALTER CONSTRAINT
- e798d095da3a 14.0 landed
- 91a6b3862fef 13.3 landed
- 72fabd4bfb5a 12.7 landed