diff options
Diffstat (limited to 'src/backend/optimizer/plan/planmain.c')
-rw-r--r-- | src/backend/optimizer/plan/planmain.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index a8159dd972b..94365808b84 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.78.4.1 2005/09/28 21:17:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.78.4.2 2007/10/04 20:45:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -136,6 +136,13 @@ query_planner(Query *root, List *tlist, double tuple_fraction, (void) distribute_quals_to_rels(root, (Node *) root->jointree, false); /* + * Vars mentioned in InClauseInfo items also have to be added to baserel + * targetlists. Nearly always, they'd have got there from the original + * WHERE qual, but in corner cases maybe not. + */ + add_IN_vars_to_tlists(root); + + /* * Use the completed lists of equijoined keys to deduce any implied * but unstated equalities (for example, A=B and B=C imply A=C). */ |