From 1cf8222603379a6060d0acf4e3b292586e963bdb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 24 May 2005 18:03:24 +0000 Subject: [PATCH] Previous fix for "x FULL JOIN y ON true" failed to handle the case where there was also a WHERE-clause restriction that applied to the join. The check on restrictlist == NIL is really unnecessary anyway, because select_mergejoin_clauses already checked for and complained about any unmergejoinable join clauses. So just take it out. --- src/backend/optimizer/path/joinpath.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 7c9d1f8be5..b8b800cc9c 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -499,15 +499,10 @@ match_unsorted_outer(Query *root, * nestloop path, but since mergejoin is our only join type that * supports FULL JOIN, it's necessary to generate a clauseless * mergejoin path instead. - * - * Unfortunately this can't easily be extended to handle the case - * where there are joinclauses but none of them use mergejoinable - * operators; nodeMergejoin.c can only do a full join correctly if - * all the joinclauses are mergeclauses. */ if (mergeclauses == NIL) { - if (jointype == JOIN_FULL && restrictlist == NIL) + if (jointype == JOIN_FULL) /* okay to try for mergejoin */ ; else continue; -- 2.39.5