|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.41 2000/01/26 05:56:34 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.42 2000/02/06 03:27:32 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -144,8 +144,8 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel, |
144 | 144 | RelOptInfo*join_rel=lfirst(r); |
145 | 145 |
|
146 | 146 | Assert(length(join_rel->relids)>1); |
147 | | -if (is_subset(unjoined_relids,join_rel->relids)&& |
148 | | -nonoverlap_sets(old_rel->relids,join_rel->relids)) |
| 147 | +if (is_subseti(unjoined_relids,join_rel->relids)&& |
| 148 | +nonoverlap_setsi(old_rel->relids,join_rel->relids)) |
149 | 149 | { |
150 | 150 | joined_rel=make_join_rel(old_rel,join_rel); |
151 | 151 | join_list=lappend(join_list,joined_rel); |
@@ -175,7 +175,7 @@ make_rels_by_clauseless_joins(RelOptInfo *old_rel, List *inner_rels) |
175 | 175 | { |
176 | 176 | RelOptInfo*inner_rel= (RelOptInfo*)lfirst(i); |
177 | 177 |
|
178 | | -if (nonoverlap_sets(inner_rel->relids,old_rel->relids)) |
| 178 | +if (nonoverlap_setsi(inner_rel->relids,old_rel->relids)) |
179 | 179 | { |
180 | 180 | join_list=lappend(join_list, |
181 | 181 | make_join_rel(old_rel,inner_rel)); |
@@ -404,39 +404,3 @@ get_cheapest_complete_rel(List *join_rel_list) |
404 | 404 |
|
405 | 405 | returnfinal_rel; |
406 | 406 | } |
407 | | - |
408 | | -/* |
409 | | - * Subset-inclusion tests on integer lists. |
410 | | - * |
411 | | - * XXX these probably ought to be in nodes/list.c or some such place. |
412 | | - */ |
413 | | - |
414 | | -bool |
415 | | -nonoverlap_sets(List*s1,List*s2) |
416 | | -{ |
417 | | -List*x; |
418 | | - |
419 | | -foreach(x,s1) |
420 | | -{ |
421 | | -inte=lfirsti(x); |
422 | | - |
423 | | -if (intMember(e,s2)) |
424 | | -return false; |
425 | | -} |
426 | | -return true; |
427 | | -} |
428 | | - |
429 | | -bool |
430 | | -is_subset(List*s1,List*s2) |
431 | | -{ |
432 | | -List*x; |
433 | | - |
434 | | -foreach(x,s1) |
435 | | -{ |
436 | | -inte=lfirsti(x); |
437 | | - |
438 | | -if (!intMember(e,s2)) |
439 | | -return false; |
440 | | -} |
441 | | -return true; |
442 | | -} |