mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
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.
This commit is contained in:
parent
bc6444dc6a
commit
872c1497fc
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.93 2005/04/19 22:35:15 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.94 2005/05/24 18:02:31 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user