From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix EXPLAIN output for cases where parent table is excluded by c
Date: Tue, 17 Feb 2015 23:04:19 +0000
Message-ID: <E1YNrBj-00031K-BQ@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix EXPLAIN output for cases where parent table is excluded by c
In-Reply-To: <E1YNrBj-00031K-BQ@gemulon.postgresql.org>
References: <E1YNrBj-00031K-BQ@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox