In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
authorTom Lane <[email protected]>
Tue, 6 Dec 2005 16:59:22 +0000 (16:59 +0000)
committerTom Lane <[email protected]>
Tue, 6 Dec 2005 16:59:22 +0000 (16:59 +0000)
clauses even if it's an outer join.  This is a corner case since such
clauses could only arise from weird OUTER JOIN ON conditions, but worth
fixing.  Per example from Ron at cheapcomplexdevices.com.

src/backend/optimizer/path/indxpath.c

index 4b56cc13d43332261cd0a5d1f9a7dff3ce943953..77518f6c480589f979450f24af3f98a415e81b40 100644 (file)
@@ -666,10 +666,6 @@ group_clauses_by_indexkey_for_join(Query *root,
                {
                        RestrictInfo *rinfo = (RestrictInfo *) lfirst(i);
 
-                       /* Can't use pushed-down clauses in outer join */
-                       if (isouterjoin && rinfo->ispusheddown)
-                               continue;
-
                        if (match_clause_to_indexcol(rel,
                                                                                 index,
                                                                                 indexcol,