OSDN Git Service

Teach planner to convert simple UNION ALL subqueries into append relations,
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Feb 2006 21:08:49 +0000 (21:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Feb 2006 21:08:49 +0000 (21:08 +0000)
commit8b109ebf14cf449d36f293a4cb8188360fd5aec6
tree653cf3144a049c85856f9bd8ee4edae6a09e94f4
parenta25b1decef62b2b47504bbf40b9add149ed5b8dc
Teach planner to convert simple UNION ALL subqueries into append relations,
thereby sharing code with the inheritance case.  This puts the UNION-ALL-view
approach to partitioned tables on par with inheritance, so far as constraint
exclusion is concerned: it works either way.  (Still need to update the docs
to say so.)  The definition of "simple UNION ALL" is a little simpler than
I would like --- basically the union arms can only be SELECT * FROM foo
--- but it's good enough for partitioned-table cases.
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/tlist.c
src/include/optimizer/pathnode.h
src/include/optimizer/prep.h
src/include/optimizer/tlist.h