Re: ALTER CONSTRAINT on a partitioned FK isn't working - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: ALTER CONSTRAINT on a partitioned FK isn't working
Date
Msg-id 20201207233414.GA24167@alvherre.pgsql
Whole thread Raw
In response to ALTER CONSTRAINT on a partitioned FK isn't working  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER CONSTRAINT on a partitioned FK isn't working
List 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 ...



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: ALTER CONSTRAINT on a partitioned FK isn't working
Next
From: Alvaro Herrera
Date:
Subject: Re: ALTER CONSTRAINT on a partitioned FK isn't working