diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-24 18:02:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-24 18:02:55 +0000 |
commit | a94ace0796b8719c6685351b02fe93459c206c38 (patch) | |
tree | 199400f06f54fbb48e0e296224665218cc5aa4f8 /src | |
parent | 6d493ed7f54433f4d1289af9c3b000dfc51535e7 (diff) | |
download | postgresql-a94ace0796b8719c6685351b02fe93459c206c38.tar.gz postgresql-a94ace0796b8719c6685351b02fe93459c206c38.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 0a2619d8f5e..6bc24fc258b 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.91.4.1 2005/01/23 02:22:27 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.91.4.2 2005/05/24 18:02:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -498,15 +498,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; |