OSDN Git Service

Restructure handling of inheritance queries so that they work with outer
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 12 Nov 2000 00:37:02 +0000 (00:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 12 Nov 2000 00:37:02 +0000 (00:37 +0000)
commit6543d81d659f4176c6530fb09eef83deede264a0
treec1dd2a57ee5e640214978ae72e8e7b2f624f8972
parent609f9199af2411a52bb9731d8aa1f13885c439b5
Restructure handling of inheritance queries so that they work with outer
joins, and clean things up a good deal at the same time.  Append plan node
no longer hacks on rangetable at runtime --- instead, all child tables are
given their own RT entries during planning.  Concept of multiple target
tables pushed up into execMain, replacing bug-prone implementation within
nodeAppend.  Planner now supports generating Append plans for inheritance
sets either at the top of the plan (the old way) or at the bottom.  Expanding
at the bottom is appropriate for tables used as sources, since they may
appear inside an outer join; but we must still expand at the top when the
target of an UPDATE or DELETE is an inheritance set, because we actually need
a different targetlist and junkfilter for each target table in that case.
Fortunately a target table can't be inside an outer join...  Bizarre mutual
recursion between union_planner and prepunion.c is gone --- in fact,
union_planner doesn't really have much to do with union queries anymore,
so I renamed it grouping_planner.
37 files changed:
src/backend/commands/command.c
src/backend/commands/copy.c
src/backend/commands/explain.c
src/backend/executor/execMain.c
src/backend/executor/execQual.c
src/backend/executor/execTuples.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeSeqscan.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/README
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/relnode.c
src/backend/parser/parse_clause.c
src/backend/tcop/pquery.c
src/include/catalog/catversion.h
src/include/executor/executor.h
src/include/executor/tuptable.h
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/optimizer/pathnode.h
src/include/optimizer/planmain.h
src/include/optimizer/planner.h
src/include/optimizer/prep.h