Skip to content

Commit 872c149

Browse files
committed
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.
1 parent bc6444d commit 872c149

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/backend/optimizer/path/joinpath.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.93 2005/04/19 22:35:15 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.94 2005/05/24 18:02:31 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -499,15 +499,10 @@ match_unsorted_outer(Query *root,
499499
* nestloop path, but since mergejoin is our only join type that
500500
* supports FULL JOIN, it's necessary to generate a clauseless
501501
* mergejoin path instead.
502-
*
503-
* Unfortunately this can't easily be extended to handle the case
504-
* where there are joinclauses but none of them use mergejoinable
505-
* operators; nodeMergejoin.c can only do a full join correctly if
506-
* all the joinclauses are mergeclauses.
507502
*/
508503
if (mergeclauses == NIL)
509504
{
510-
if (jointype == JOIN_FULL && restrictlist == NIL)
505+
if (jointype == JOIN_FULL)
511506
/* okay to try for mergejoin */ ;
512507
else
513508
continue;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy