• Neil Conway's avatar
    When enqueueing after-row triggers for updates of a table with a foreign · adfeef55
    Neil Conway authored
    key, compare the new and old row versions. If the foreign key column has
    not changed, we needn't enqueue the trigger, since the update cannot
    violate the foreign key. This optimization was previously applied in the
    RI trigger function, but it is more efficient to avoid firing the trigger
    altogether. Per recent discussion on pgsql-hackers.
    
    Also add a regression test for some unintuitive foreign key behavior, and
    refactor some code that deals with the OIDs of the various RI trigger
    functions.
    adfeef55
tablecmds.c 175 KB