pgsql: Rethink representation of PathTargets. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Rethink representation of PathTargets.
Date
Msg-id E1afZav-0000z4-Mf@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Rethink representation of PathTargets.

In commit 19a541143a09c067 I did not make PathTarget a subtype of Node,
and embedded a RelOptInfo's reltarget directly into it rather than having
a separately-allocated Node.  In hindsight that was misguided
micro-optimization, enabled by the fact that at that point we didn't have
any Paths with custom PathTargets.  Now that PathTarget processing has
been fleshed out some more, it's easier to see that it's better to have
PathTarget as an indepedent Node type, even if it does cost us one more
palloc to create a RelOptInfo.  So change it while we still can.

This commit just changes the representation, without doing anything more
interesting than that.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/307c78852f516042cebacaed411a0391bfeb2129

Modified Files
--------------
contrib/file_fdw/file_fdw.c              |  4 +-
contrib/postgres_fdw/deparse.c           |  4 +-
contrib/postgres_fdw/postgres_fdw.c      | 10 ++---
doc/src/sgml/fdwhandler.sgml             |  2 +-
src/backend/nodes/outfuncs.c             | 46 +++++++++++-----------
src/backend/optimizer/path/allpaths.c    | 22 +++++------
src/backend/optimizer/path/costsize.c    | 20 +++++-----
src/backend/optimizer/path/indxpath.c    |  8 ++--
src/backend/optimizer/plan/createplan.c  |  2 +-
src/backend/optimizer/plan/initsplan.c   |  4 +-
src/backend/optimizer/plan/planmain.c    |  2 +-
src/backend/optimizer/plan/planner.c     |  4 +-
src/backend/optimizer/util/pathnode.c    | 44 ++++++++++-----------
src/backend/optimizer/util/placeholder.c | 14 +++----
src/backend/optimizer/util/relnode.c     | 23 +++++------
src/backend/optimizer/util/tlist.c       |  6 +--
src/include/nodes/nodes.h                |  1 +
src/include/nodes/relation.h             | 65 +++++++++++++++++---------------
18 files changed, 143 insertions(+), 138 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Update PL/Perl's comment about hv_store().
Next
From: Tom Lane
Date:
Subject: pgsql: Allow callers of create_foreignscan_path to specify nondefault P