summaryrefslogtreecommitdiff
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:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-31 19:54:11 +0000
commite938544befb4b7eaecf1287d46cb39f4cda05567 (patch)
tree4696701a9ca5c79ac5709c028820e74641ceb889 /src/backend/optimizer/path/indxpath.c
parent59bb0282d46f58e3cf29c8c7730030386d9e65cc (diff)
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index dc26fc40cac..6e803ebdc19 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.167.4.3 2005/12/06 16:50:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.167.4.4 2007/07/31 19:54:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -386,6 +386,8 @@ group_clauses_by_indexkey_for_join(Query *root,
{
clausegroup = remove_redundant_join_clauses(root,
clausegroup,
+ outer_relids,
+ rel->relids,
jointype);
}