1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +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

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/optimizer/geqo/geqo_eval.c,v 1.81 2006/10/24 17:50:22 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/geqo/geqo_eval.c,v 1.82 2006/12/12 21:31:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -258,7 +258,7 @@ desirable_join(PlannerInfo *root,
/*
* Join if there is an applicable join clause.
*/
if (have_relevant_joinclause(outer_rel, inner_rel))
if (have_relevant_joinclause(root, outer_rel, inner_rel))
return true;
/*