Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables
Date
Msg-id 354613.1718898657@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I think it's not a bad idea to suggest that we could have a new command
> ALTER TABLE .. DISABLE CONSTRAINT, which can be run by the table owner
> and paired with a later ALTER TABLE ENABLE CONSTRAINT, which verifies
> the constraint.

The existing, supported way to do this is to drop the foreign key
constraint and then later re-create it.

As noted, if you mess with the triggers directly then any subsequent
breakage is your responsibility.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae
Next
From: Tom Lane
Date:
Subject: Re: BUG #18517: Dropping a table referenced by an initially deferred foreign key fails with an error