From 9ab4d98168407c3436d3f0e02d32720b0d9075a0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 5 Jun 2005 22:32:58 +0000 Subject: 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. --- src/include/nodes/parsenodes.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/include/nodes/parsenodes.h') diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 9a525eb1de0..04b32082ebf 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.280 2005/06/05 00:38:10 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.281 2005/06/05 22:32:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,8 +62,9 @@ typedef uint32 AclMode; /* a bitmask of privilege bits */ * Query - * all statements are turned into a Query tree (via transformStmt) * for further processing by the optimizer - * utility statements (i.e. non-optimizable statements) - * have the *utilityStmt field set. + * + * utility statements (i.e. non-optimizable statements) have the + * utilityStmt field set, and the Query itself is mostly dummy. */ typedef struct Query { @@ -121,17 +122,6 @@ typedef struct Query * ought to go in some sort of TopPlan plan node, not in the Query. */ List *resultRelations; /* integer list of RT indexes, or NIL */ - - /* internal to planner */ - List *base_rel_list; /* list of base-relation RelOptInfos */ - List *other_rel_list; /* list of other 1-relation RelOptInfos */ - List *join_rel_list; /* list of join-relation RelOptInfos */ - List *equi_key_list; /* list of lists of equijoined - * PathKeyItems */ - List *in_info_list; /* list of InClauseInfos */ - List *query_pathkeys; /* desired pathkeys for query_planner() */ - bool hasJoinRTEs; /* true if any RTEs are RTE_JOIN kind */ - bool hasHavingQual; /* true if havingQual was non-null */ } Query; -- cgit v1.2.3