aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-03-03 23:26:45 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-03-03 23:26:45 +0000
commited8b7bdff9a7ab05ed7e34f575a3802b7cc3e51b (patch)
tree3dd7ebf904f3a31c5c4e77200e046399b5354464
parenta454ed584db2126d1c8816ff0ca58d17d34829ff (diff)
downloadpostgresql-ed8b7bdff9a7ab05ed7e34f575a3802b7cc3e51b.tar.gz
postgresql-ed8b7bdff9a7ab05ed7e34f575a3802b7cc3e51b.zip
Patch from Martin due to changes in joinrels.c
-rw-r--r--src/backend/optimizer/geqo/geqo_eval.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c
index 74ab0e6e78d..72a10ee9dfc 100644
--- a/src/backend/optimizer/geqo/geqo_eval.c
+++ b/src/backend/optimizer/geqo/geqo_eval.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.5 1997/03/01 22:22:21 momjian Exp $
+ * $Id: geqo_eval.c,v 1.6 1997/03/03 23:26:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -371,10 +371,18 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
List *xjoininfo = NIL;
foreach (xjoininfo, joininfo_list) {
+ List *or;
JInfo *joininfo = (JInfo*)lfirst(xjoininfo);
new_otherrels = joininfo->otherrels;
- if (nonoverlap_sets(new_otherrels,join_relids)) {
+ foreach (or, new_otherrels)
+ {
+ if ( intMember (lfirsti(or), join_relids) )
+ new_otherrels = lremove ((void*)lfirst(or), new_otherrels);
+ }
+ joininfo->otherrels = new_otherrels;
+ if ( new_otherrels != NIL )
+ {
other_joininfo = joininfo_member(new_otherrels,
current_joininfo_list);
if(other_joininfo) {