1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Fix bushy plans. Cleanup.

This commit is contained in:
Bruce Momjian
1999-02-18 00:49:48 +00:00
parent c82ca4c158
commit 31cce21fb0
22 changed files with 182 additions and 365 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.17 1999/02/15 05:21:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.18 1999/02/18 00:49:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,16 +38,16 @@
JoinInfo *
joininfo_member(List *join_relids, List *joininfo_list)
{
List *i = NIL;
List *other_rels = NIL;
List *i;
foreach(i, joininfo_list)
{
other_rels = lfirst(i);
if (same(join_relids, ((JoinInfo *) other_rels)->unjoined_rels))
return (JoinInfo *) other_rels;
JoinInfo *joininfo = (JoinInfo *)lfirst(i);
if (same(join_relids, joininfo->unjoined_relids))
return joininfo;
}
return (JoinInfo *) NULL;
return NULL;
}
@@ -62,7 +62,7 @@ joininfo_member(List *join_relids, List *joininfo_list)
*
*/
JoinInfo *
find_joininfo_node(RelOptInfo *this_rel, List *join_relids)
find_joininfo_node(RelOptInfo *this_rel, Relids join_relids)
{
JoinInfo *joininfo = joininfo_member(join_relids,
this_rel->joininfo);
@@ -70,11 +70,10 @@ find_joininfo_node(RelOptInfo *this_rel, List *join_relids)
if (joininfo == NULL)
{
joininfo = makeNode(JoinInfo);
joininfo->unjoined_rels = join_relids;
joininfo->unjoined_relids = join_relids;
joininfo->jinfo_restrictinfo = NIL;
joininfo->mergejoinable = false;
joininfo->hashjoinable = false;
joininfo->bushy_inactive = false;
this_rel->joininfo = lcons(joininfo, this_rel->joininfo);
}
return joininfo;