• Tom Lane's avatar
    Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CONSTRAINT. · a4820434
    Tom Lane authored
    When altering the deferredness state of a foreign key constraint, we
    correctly updated the catalogs and then invalidated the relcache state for
    the target relation ... but that's not the only relation with relevant
    triggers.  Must invalidate the other table as well, or the state change
    fails to take effect promptly for operations triggered on the other table.
    Per bug #13224 from Christian Ullrich.
    
    In passing, reorganize regression test case for this feature so that it
    isn't randomly injected into the middle of an unrelated test sequence.
    
    Oversight in commit f177cbfe.  Back-patch
    to 9.4 where the faulty code was added.
    a4820434
foreign_key.out 52.5 KB