pgsql: Fix EXPLAIN output for cases where parent table is excluded by c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix EXPLAIN output for cases where parent table is excluded by c
Date: 2015-02-17 23:04:19
Message-ID: E1YNrBj-00031K-BQ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix EXPLAIN output for cases where parent table is excluded by constraints.

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/abe45a9b315d7b3739f442597f570f9454bd466d

Modified Files
--------------
src/backend/commands/explain.c | 14 ++------------
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 1 +
src/backend/optimizer/plan/createplan.c | 2 ++
src/backend/optimizer/plan/planner.c | 19 ++++++++++++++++++-
src/backend/optimizer/plan/setrefs.c | 2 ++
src/include/nodes/plannodes.h | 3 ++-
src/include/optimizer/planmain.h | 1 +
8 files changed, 29 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-02-18 16:43:09 pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd.
Previous Message Heikki Linnakangas 2015-02-17 21:00:30 pgsql: Fix a bug in pairing heap removal code.