1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Fix planner to do the right thing when a degenerate outer join (one whose

joinclause doesn't use any outer-side vars) requires a "bushy" plan to be
created.  The normal heuristic to avoid joins with no joinclause has to be
overridden in that case.  Problem is new in 8.2; before that we forced the
outer join order anyway.  Per example from Teodor.
This commit is contained in:
Tom Lane
2006-12-12 21:31:02 +00:00
parent 0afabecbfd
commit f18c57fdf1
4 changed files with 52 additions and 11 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/optimizer/joininfo.h,v 1.31 2006/03/05 15:58:57 momjian Exp $
* $PostgreSQL: pgsql/src/include/optimizer/joininfo.h,v 1.32 2006/12/12 21:31:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,8 @@
#include "nodes/relation.h"
extern bool have_relevant_joinclause(RelOptInfo *rel1, RelOptInfo *rel2);
extern bool have_relevant_joinclause(PlannerInfo *root,
RelOptInfo *rel1, RelOptInfo *rel2);
extern void add_join_clause_to_rels(PlannerInfo *root,
RestrictInfo *restrictinfo,