diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-24 15:59:58 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-24 15:59:58 +0000 |
commit | e349eb6e2c9084fe4baff4eacac3ea274aec1e6e (patch) | |
tree | 557b7f0a808faa80dd0fd5082e1fd3f658bae43a | |
parent | a1ac1989cf01671d6ed4fb14618c78713d1c944d (diff) | |
download | postgresql-e349eb6e2c9084fe4baff4eacac3ea274aec1e6e.tar.gz postgresql-e349eb6e2c9084fe4baff4eacac3ea274aec1e6e.zip |
Bug (yet unfixed but not fatal) found: Re-moving index clauses from the
nestloop's join clauses doesn't work in some cases:
* 1. fix_indxqual_references may change varattno-s in
* inner_indxqual;
* 2. clauses may be commuted
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index c56cc61c805..7637d15f200 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.10 1997/04/22 03:30:36 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.11 1997/04/24 15:59:58 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -432,7 +432,7 @@ create_nestloop_node(JoinPath *best_path, foreach (inner_qual, inner_indxqual) { - if ( !(qual_clause_p ((Node*)inner_qual)) ) + if ( !qual_clause_p ((Node*)lfirst(inner_qual)) ) { found = true; break; @@ -443,12 +443,18 @@ create_nestloop_node(JoinPath *best_path, * index clauses from the nestloop's join clauses and reset the * inner(index) scan's qualification so that the var nodes refer to * the proper outer join relation attributes. + * + * XXX Re-moving index clauses doesn't work properly: + * 1. fix_indxqual_references may change varattno-s in + * inner_indxqual; + * 2. clauses may be commuted + * I havn't time to fix it at the moment. - vadim 04/24/97 */ if ( found ) { List *new_inner_qual = NIL; - clauses = set_difference(clauses,inner_indxqual); + clauses = set_difference(clauses,inner_indxqual); /* XXX */ new_inner_qual = index_outerjoin_references(inner_indxqual, outer_node->targetlist, |