pgsql: Improve handling of pathtargets in planner.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve handling of pathtargets in planner.c.
Date: 2016-03-09 06:12:29
Message-ID: E1adXMD-0006Nu-AM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve handling of pathtargets in planner.c.

Refactor so that the internal APIs in planner.c deal in PathTargets not
targetlists, and establish a more regular structure for deriving the
targets needed for successive steps.

There is more that could be done here; calculating the eval costs of each
successive target independently is both inefficient and wrong in detail,
since we won't actually recompute values available from the input node's
tlist. But it's no worse than what happened before the pathification
rewrite. In any case this seems like a good starting point for considering
how to handle Konstantin Knizhnik's function-evaluation-postponement patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/51c0f63e4d76a86b44e87876a6addcfffb01ec28

Modified Files
--------------
src/backend/optimizer/plan/planner.c | 235 ++++++++++++++++++-----------------
src/backend/optimizer/util/clauses.c | 10 +-
src/backend/optimizer/util/tlist.c | 60 +++++++++
src/include/optimizer/tlist.h | 3 +
4 files changed, 190 insertions(+), 118 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-03-09 15:29:21 pgsql: Fix copy-and-pasteo in comment.
Previous Message Andres Freund 2016-03-09 03:42:36 pgsql: Add valgrind suppressions for python code.