diff options
Diffstat (limited to 'src/backend/optimizer/plan/planmain.c')
-rw-r--r-- | src/backend/optimizer/plan/planmain.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 79a28cae3a9..1c87b24e4c6 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/plan/planmain.c,v 1.82 2005/06/05 22:32:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/plan/planmain.c,v 1.83 2005/06/06 04:13:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -106,12 +106,15 @@ query_planner(PlannerInfo *root, List *tlist, double tuple_fraction, &constant_quals); /* - * init planner lists to empty + * Init planner lists to empty. We create the base_rel_array with a + * size that will be sufficient if no pullups or inheritance additions + * happen ... otherwise it will be enlarged as needed. * * NOTE: in_info_list was set up by subquery_planner, do not touch here */ - root->base_rel_list = NIL; - root->other_rel_list = NIL; + root->base_rel_array_size = list_length(parse->rtable) + 1; + root->base_rel_array = (RelOptInfo **) + palloc0(root->base_rel_array_size * sizeof(RelOptInfo *)); root->join_rel_list = NIL; root->equi_key_list = NIL; |