Remove the Query structure from the executor's API. This allows us to stop
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 20 Feb 2007 17:32:18 +0000 (17:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 20 Feb 2007 17:32:18 +0000 (17:32 +0000)
commit9cbd0c155d1602aad879f510256b626c58942080
tree6d5504a4e841313d3a29cead80067006dc408e39
parent71b0cf2f6bec3129f2c3f574d4e47408c2dc2516
Remove the Query structure from the executor's API.  This allows us to stop
storing mostly-redundant Query trees in prepared statements, portals, etc.
To replace Query, a new node type called PlannedStmt is inserted by the
planner at the top of a completed plan tree; this carries just the fields of
Query that are still needed at runtime.  The statement lists kept in portals
etc. now consist of intermixed PlannedStmt and bare utility-statement nodes
--- no Query.  This incidentally allows us to remove some fields from Query
and Plan nodes that shouldn't have been there in the first place.

Still to do: simplify the execution-time range table; at the moment the
range table passed to the executor still contains Query trees for subqueries.

initdb forced due to change of stored rules.
39 files changed:
src/backend/commands/copy.c
src/backend/commands/explain.c
src/backend/commands/portalcmds.c
src/backend/commands/prepare.c
src/backend/executor/execMain.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/spi.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/plan/planner.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/backend/utils/mmgr/portalmem.c
src/include/catalog/catversion.h
src/include/commands/portalcmds.h
src/include/commands/prepare.h
src/include/executor/execdesc.h
src/include/executor/executor.h
src/include/executor/spi_priv.h
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/nodes/primnodes.h
src/include/nodes/relation.h
src/include/optimizer/planner.h
src/include/tcop/pquery.h
src/include/tcop/tcopprot.h
src/include/tcop/utility.h
src/include/utils/portal.h
src/pl/plpgsql/src/pl_exec.c