• Tom Lane's avatar
    Fix EXPLAIN output for cases where parent table is excluded by constraints. · abe45a9b
    Tom Lane authored
    The previous coding in EXPLAIN always labeled a ModifyTable node with the
    name of the target table affected by its first child plan.  When originally
    written, this was necessarily the parent table of the inheritance tree,
    so everything was unconfusing.  But when we added NO INHERIT constraints,
    it became possible for the parent table to be deleted from the plan by
    constraint exclusion while still leaving child tables present.  This led to
    the ModifyTable plan node being labeled with the first surviving child,
    which was deemed confusing.  Fix it by retaining the parent table's RT
    index in a new field in ModifyTable.
    
    Etsuro Fujita, reviewed by Ashutosh Bapat and myself
    abe45a9b
copyfuncs.c 95.7 KB