]> granicus.if.org Git - postgresql/blobdiff - src/backend/optimizer/util/placeholder.c
Make some small planner API cleanups.
[postgresql] / src / backend / optimizer / util / placeholder.c
index 5b85a4ddadcd14991b2550697fe8837bb6c83412..b24478ec6f2c2685e104e5c999d5468469c0b37b 100644 (file)
@@ -4,7 +4,7 @@
  *       PlaceHolderVar and PlaceHolderInfo manipulation routines
  *
  *
- * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
@@ -62,7 +62,7 @@ make_placeholder_expr(PlannerInfo *root, Expr *expr, Relids phrels)
  * simplified query passed to query_planner().
  *
  * Note: this should only be called after query_planner() has started.  Also,
- * create_new_ph must not be TRUE after deconstruct_jointree begins, because
+ * create_new_ph must not be true after deconstruct_jointree begins, because
  * make_outerjoininfo assumes that we already know about all placeholders.
  */
 PlaceHolderInfo *
@@ -101,7 +101,7 @@ find_placeholder_info(PlannerInfo *root, PlaceHolderVar *phv,
        rels_used = pull_varnos((Node *) phv->phexpr);
        phinfo->ph_lateral = bms_difference(rels_used, phv->phrels);
        if (bms_is_empty(phinfo->ph_lateral))
-               phinfo->ph_lateral = NULL;              /* make it exactly NULL if empty */
+               phinfo->ph_lateral = NULL;      /* make it exactly NULL if empty */
        phinfo->ph_eval_at = bms_int_members(rels_used, phv->phrels);
        /* If no contained vars, force evaluation at syntactic location */
        if (bms_is_empty(phinfo->ph_eval_at))
@@ -393,7 +393,6 @@ add_placeholders_to_base_rels(PlannerInfo *root)
 
                        rel->reltarget->exprs = lappend(rel->reltarget->exprs,
                                                                                        copyObject(phinfo->ph_var));
-                       rel->reltarget_has_non_vars = true;
                        /* reltarget's cost and width fields will be updated later */
                }
        }
@@ -428,7 +427,6 @@ add_placeholders_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
                                /* Yup, add it to the output */
                                joinrel->reltarget->exprs = lappend(joinrel->reltarget->exprs,
                                                                                                        phinfo->ph_var);
-                               joinrel->reltarget_has_non_vars = true;
                                joinrel->reltarget->width += phinfo->ph_width;
 
                                /*