diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 14 | ||||
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 12 | ||||
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 4 | ||||
-rw-r--r-- | src/backend/optimizer/plan/planner.c | 6 | ||||
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 6 |
5 files changed, 24 insertions, 18 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 2698f084787..627f62c84f8 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.244 2003/02/16 02:30:37 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.245 2003/03/05 20:01:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1481,12 +1481,16 @@ _copyQuery(Query *from) COPY_NODE_FIELD(limitCount); COPY_NODE_FIELD(setOperations); COPY_INTLIST_FIELD(resultRelations); + COPY_NODE_FIELD(in_info_list); + COPY_SCALAR_FIELD(hasJoinRTEs); /* - * We do not copy the planner internal fields: base_rel_list, - * other_rel_list, join_rel_list, equi_key_list, in_info_list, - * query_pathkeys, hasJoinRTEs. That would get us into copying - * RelOptInfo/Path trees, which we don't want to do. + * 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 and hasJoinRTEs + * for the benefit of inheritance_planner(), which may try to copy a + * Query in which these are already set. */ return newnode; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 378d8e44031..6a0f3660097 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.187 2003/02/16 02:30:37 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.188 2003/03/05 20:01:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -576,12 +576,14 @@ _equalQuery(Query *a, Query *b) COMPARE_NODE_FIELD(limitCount); COMPARE_NODE_FIELD(setOperations); COMPARE_INTLIST_FIELD(resultRelations); + COMPARE_NODE_FIELD(in_info_list); + COMPARE_SCALAR_FIELD(hasJoinRTEs); /* - * We do not check the internal-to-the-planner fields: base_rel_list, - * other_rel_list, join_rel_list, equi_key_list, in_info_list, - * query_pathkeys, hasJoinRTEs. They might not be set yet, and in any - * case they should be derivable from the other fields. + * We do not check the other planner internal fields: base_rel_list, + * other_rel_list, join_rel_list, equi_key_list, query_pathkeys. + * They might not be set yet, and in any case they should be derivable + * from the other fields. */ return true; } diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 24a604716b8..99d979d57c0 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.97 2003/02/15 20:12:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.98 2003/03/05 20:01:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -115,7 +115,7 @@ set_base_rel_pathlists(Query *root) /* RangeFunction --- generate a separate plan for it */ set_function_pathlist(root, rel, rte); } - else if ((inheritlist = expand_inherted_rtentry(root, rti, true)) + else if ((inheritlist = expand_inherited_rtentry(root, rti, true)) != NIL) { /* Relation is root of an inheritance tree, process specially */ diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index c597e44f1d4..c7c072fe2eb 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.149 2003/03/05 18:38:14 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.150 2003/03/05 20:01:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -276,8 +276,8 @@ subquery_planner(Query *parse, double tuple_fraction) * grouping_planner. */ if (parse->resultRelation && - (lst = expand_inherted_rtentry(parse, parse->resultRelation, false)) - != NIL) + (lst = expand_inherited_rtentry(parse, parse->resultRelation, + false)) != NIL) plan = inheritance_planner(parse, lst); else plan = grouping_planner(parse, tuple_fraction); diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 0f63d2306c7..f0a64f2980c 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.90 2003/02/09 06:56:27 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.91 2003/03/05 20:01:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -642,7 +642,7 @@ find_all_inheritors(Oid parentrel) } /* - * expand_inherted_rtentry + * expand_inherited_rtentry * Check whether a rangetable entry represents an inheritance set. * If so, add entries for all the child tables to the query's * rangetable, and return an integer list of RT indexes for the @@ -666,7 +666,7 @@ find_all_inheritors(Oid parentrel) * XXX probably should convert the result type to Relids? */ List * -expand_inherted_rtentry(Query *parse, Index rti, bool dup_parent) +expand_inherited_rtentry(Query *parse, Index rti, bool dup_parent) { RangeTblEntry *rte = rt_fetch(rti, parse->rtable); Oid parentOID; |