1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-29 23:43:17 +03:00

Ensure that mergejoin plan will be considered for FULL OUTER JOIN even

if enable_mergejoin = OFF.  Must do this, because we have no other
implementation method for full joins.
This commit is contained in:
Tom Lane
2000-11-23 03:57:31 +00:00
parent 5479c11bfa
commit 48437f5c3a
2 changed files with 13 additions and 6 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.52 2000/11/16 22:30:25 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.53 2000/11/23 03:57:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -454,9 +454,13 @@ distribute_qual_to_rels(Query *root, Node *clause,
* joining.
*
* We don't bother setting the merge/hashjoin info if we're not
* going to need it.
* going to need it. We do want to know about mergejoinable ops
* in any potential equijoin clause (see later in this routine),
* and we ignore enable_mergejoin if isouterjoin is true, because
* mergejoin is the only implementation we have for full and right
* outer joins.
*/
if (enable_mergejoin || can_be_equijoin)
if (enable_mergejoin || isouterjoin || can_be_equijoin)
check_mergejoinable(restrictinfo);
if (enable_hashjoin)
check_hashjoinable(restrictinfo);