1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Remove planner's private fields from Query struct, and put them into

a new PlannerInfo struct, which is passed around instead of the bare
Query in all the planning code.  This commit is essentially just a
code-beautification exercise, but it does open the door to making
larger changes to the planner data structures without having to muck
with the widely-known Query struct.
This commit is contained in:
Tom Lane
2005-06-05 22:32:58 +00:00
parent 22dbd54047
commit 9ab4d98168
51 changed files with 852 additions and 707 deletions

View File

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.304 2005/04/28 21:47:12 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.305 2005/06/05 22:32:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1615,18 +1615,6 @@ _copyQuery(Query *from)
COPY_NODE_FIELD(limitCount);
COPY_NODE_FIELD(setOperations);
COPY_NODE_FIELD(resultRelations);
COPY_NODE_FIELD(in_info_list);
COPY_SCALAR_FIELD(hasJoinRTEs);
COPY_SCALAR_FIELD(hasHavingQual);
/*
* We do not copy the other planner internal fields: base_rel_list,
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys. That
* would get us into copying RelOptInfo/Path trees, which we don't
* want to do. It is necessary to copy in_info_list, hasJoinRTEs,
* and hasHavingQual for the benefit of inheritance_planner(), which
* may try to copy a Query in which these are already set.
*/
return newnode;
}