diff options
Diffstat (limited to 'src/backend/optimizer/path/joinpath.c')
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index df3bd128747..450bc26bed9 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.100 2006/02/03 21:08:49 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.101 2006/02/04 23:03:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -867,14 +867,13 @@ join_before_append(PlannerInfo *root, Assert(childrel->reloptkind == RELOPT_OTHER_MEMBER_REL); /* - * If the child has no cheapest_total_path, assume it was deemed - * excludable by constraint exclusion (see set_append_rel_pathlist). + * Check to see if child was rejected by constraint exclusion. + * If so, it will have a cheapest_total_path that's an Append path + * with no members (see set_plain_rel_pathlist). */ - if (childrel->cheapest_total_path == NULL) - { - Assert(constraint_exclusion); - continue; - } + if (IsA(childrel->cheapest_total_path, AppendPath) && + ((AppendPath *) childrel->cheapest_total_path)->subpaths == NIL) + continue; /* OK, we can ignore it */ /* * Get the best innerjoin indexpath (if any) for this outer rel. |