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