From f18c57fdf1dd255cc26c4b6b3d6716c8a54ab890 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 12 Dec 2006 21:31:02 +0000 Subject: 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. --- src/include/optimizer/joininfo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h index 7c4909ec1c2..1480f77835a 100644 --- a/src/include/optimizer/joininfo.h +++ b/src/include/optimizer/joininfo.h @@ -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, -- cgit v1.2.3