]> granicus.if.org Git - postgresql/commitdiff
In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Dec 2005 16:59:22 +0000 (16:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
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 6c702c255d235cf445b9c4c44c53d12397838867..28182c23724be9015fc6692d9b310a06454b977b 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.147.4.1 2005/04/20 21:48:22 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.147.4.2 2005/12/06 16:59:22 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -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,