Re: BUG #14025: Unable to validate constraints - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14025: Unable to validate constraints
Date
Msg-id 16650.1458257627@sss.pgh.pa.us
Whole thread Raw
In response to BUG #14025: Unable to validate constraints  (jan.kort@genetics.nl)
Responses Re: BUG #14025: Unable to validate constraints
List pgsql-bugs
jan.kort@genetics.nl writes:
> When I do:
> - disable trigger all
> - incorrect foreign key reference
> - enable trigger all
> - validate
> Then I get no error, I was expecting an error.

AFAIK, disabling a foreign key trigger is not supported; if you do it,
we give absolutely zero guarantees about the subsequent behavior of the
foreign key.

ALTER TABLE VALIDATE CONSTRAINT is not meant to fix that.  It is meant
to finish up a foreign key addition started with
ALTER TABLE ... ADD FOREIGN KEY ... NOT VALID.

            regards, tom lane

pgsql-bugs by date:

Previous
From: John R Pierce
Date:
Subject: Re: Help
Next
From: Tom Lane
Date:
Subject: Re: BUG #14028: FATAL: cannot perform encoding conversion outside a transaction