From 1be62b532b441aaff4b2d9c9dc028b96c4b7a8c7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 31 Jul 2007 19:53:50 +0000 Subject: 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. --- src/backend/optimizer/path/indxpath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/backend/optimizer/path/indxpath.c') diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 379e15a9641..f35372ebbef 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.212.2.2 2007/05/22 01:40:42 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.212.2.3 2007/07/31 19:53:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1755,6 +1755,8 @@ find_clauses_for_join(PlannerInfo *root, RelOptInfo *rel, { clause_list = remove_redundant_join_clauses(root, clause_list, + outer_relids, + rel->relids, isouterjoin); } -- cgit v1.2.3