*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.35 1999/02/15 03:22:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.36 1999/02/15 03:59:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* involves the join relation to the joininfo list of the
* other relation
*/
- add_new_joininfos(root, joined_rels, outer_rels);
+ add_rel_to_rel_joininfos(root, joined_rels, outer_rels);
}
#endif
* prune rels that have been completely incorporated into new
* join rels
*/
- outer_rels = prune_oldrels(outer_rels);
+ outer_rels = del_rels_all_bushy_inactive(outer_rels);
/*
* merge join rels if then contain the same list of base rels
*/
- outer_rels = merge_joinrels(joined_rels, outer_rels);
+ outer_rels = merge_rels_with_same_relids(joined_rels, outer_rels);
root->join_rel_list = outer_rels;
}
else
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.23 1999/02/15 03:22:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.24 1999/02/15 03:59:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
/*
- * add_new_joininfos
+ * add_rel_to_rel_joininfos
* For each new join relation, create new joininfos that
* use the join relation as inner relation, and add
* the new joininfos to those rel nodes that still
* Modifies the joininfo field of appropriate rel nodes.
*/
void
-add_new_joininfos(Query *root, List *joinrels, List *outerrels)
+add_rel_to_rel_joininfos(Query *root, List *joinrels, List *outerrels)
{
List *xjoinrel = NIL;
List *xrelid = NIL;
}
}
}
+
foreach(xrel, outerrels)
{
RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.33 1999/02/15 03:22:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.34 1999/02/15 03:59:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
/*
- * merge_rel_with_same_relids
+ * merge_rel_with_same_relids
* Prunes those relations from 'other_rels' that are redundant with
* 'rel'. A relation is redundant if it is built up of the same
* relations as 'rel'. Paths for the redundant relation are merged into
#ifdef NOT_USED
/*
- * merge_joinrels
+ * merge_rels_with_same_relids
* Given two lists of rel nodes that are already
* pruned, merge them into one pruned rel node list
*
* Returns one pruned rel node list
*/
List *
-merge_joinrels(List *rel_list1, List *rel_list2)
+merge_rels_with_same_relids(List *rel_list1, List *rel_list2)
{
List *xrel = NIL;
}
/*
- * prune_oldrels
+ * del_rels_all_bushy_inactive
* If all the joininfo's in a rel node are bushy_inactive,
* that means that this node has been joined into
* other nodes in all possible ways, therefore
* Returns a new list of rel nodes
*/
List *
-prune_oldrels(List *old_rels)
+del_rels_all_bushy_inactive(List *old_rels)
{
RelOptInfo *rel;
List *joininfo_list,
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: paths.h,v 1.17 1999/02/15 03:22:31 momjian Exp $
+ * $Id: paths.h,v 1.18 1999/02/15 03:59:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* routines to determine which relations to join
*/
extern List *make_rels_by_joins(Query *root, List *outer_rels);
-extern void add_new_joininfos(Query *root, List *joinrels, List *outerrels);
+extern void add_rel_to_rel_joininfos(Query *root, List *joinrels, List *outerrels);
extern List *make_rels_by_clause_joins(Query *root, RelOptInfo *outer_rel,
List *joininfo_list, List *only_relids);
extern List *make_rels_by_clauseless_joins(RelOptInfo *outer_rel,