summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/allpaths.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-12-17 17:08:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-12-17 17:08:06 +0000
commitea27e96dd004a21dbc1435949e5bb859b3724cd0 (patch)
tree138f470bc5f30567b16255f95e24d0b4b62da538 /src/backend/optimizer/path/allpaths.c
parent0323e570af23a8b827bae9547697c8174dd4a88b (diff)
Repair planner failure when there are multiple IN clauses, each with
a join in its subselect. In this situation we *must* build a bushy plan because there are no valid left-sided or right-sided join trees. Accordingly, hoary sanity check needs an update. Per report from Alessandro Depase.
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r--src/backend/optimizer/path/allpaths.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 2dcfc2e5613..3fb5ce51b27 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.108 2003/09/25 06:57:59 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.108.2.1 2003/12/17 17:08:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -545,6 +545,8 @@ make_one_rel_by_joins(Query *root, int levels_needed, List *initial_rels)
/*
* We should have a single rel at the final level.
*/
+ if (joinitems[levels_needed] == NIL)
+ elog(ERROR, "failed to build any %d-way joins", levels_needed);
Assert(length(joinitems[levels_needed]) == 1);
rel = (RelOptInfo *) lfirst(joinitems[levels_needed]);