aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/indxpath.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-31 19:54:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-31 19:54:27 +0000
commitc14066aa7049bac14cadc18d0c48bcf6ea81ff52 (patch)
treee1643d93294f4b79c71b10c54c3eae79f8280b59 /src/backend/optimizer/path/indxpath.c
parentfab6a867fd38cb4abe326a9cb68f924d093f3dcf (diff)
downloadpostgresql-c14066aa7049bac14cadc18d0c48bcf6ea81ff52.tar.gz
postgresql-c14066aa7049bac14cadc18d0c48bcf6ea81ff52.zip
Fix a bug in the original implementation of redundant-join-clause removal:
clauses in which one side or the other references both sides of the join cannot be removed as redundant, because that expression won't have been constrained below the join. Per report from Sergey Burladyan.
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r--src/backend/optimizer/path/indxpath.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 28182c23724..0403fd4c923 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.147.4.2 2005/12/06 16:59:22 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.147.4.3 2007/07/31 19:54:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -656,7 +656,9 @@ group_clauses_by_indexkey_for_join(Query *root,
List *nl;
nl = remove_redundant_join_clauses(root,
- FastListValue(&clausegroup),
+ FastListValue(&clausegroup),
+ outer_relids,
+ rel->relids,
jointype);
FastListFromList(&clausegroup, nl);
}