summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/nodes.h1
-rw-r--r--src/include/nodes/relation.h41
2 files changed, 2 insertions, 40 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 94bdb7c9af5..603edd3e4f2 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -247,7 +247,6 @@ typedef enum NodeTag
T_RestrictInfo,
T_PlaceHolderVar,
T_SpecialJoinInfo,
- T_LateralJoinInfo,
T_AppendRelInfo,
T_PlaceHolderInfo,
T_MinMaxAggInfo,
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index f7796f8efbe..539300561b9 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -226,8 +226,6 @@ typedef struct PlannerInfo
List *join_info_list; /* list of SpecialJoinInfos */
- List *lateral_info_list; /* list of LateralJoinInfos */
-
List *append_rel_list; /* list of AppendRelInfos */
List *rowMarks; /* list of PlanRowMarks */
@@ -357,6 +355,7 @@ typedef struct PlannerInfo
* (no duplicates) output from relation; NULL if not yet requested
* cheapest_parameterized_paths - best paths for their parameterizations;
* always includes cheapest_total_path, even if that's unparameterized
+ * direct_lateral_relids - rels this rel has direct LATERAL references to
* lateral_relids - required outer rels for LATERAL, as a Relids set
* (includes both direct and indirect lateral references)
*
@@ -466,6 +465,7 @@ typedef struct RelOptInfo
/* parameterization information needed for both base rels and join rels */
/* (see also lateral_vars and lateral_referencers) */
+ Relids direct_lateral_relids; /* rels directly laterally referenced */
Relids lateral_relids; /* minimum parameterization of rel */
/* information about a base rel (not set for join rels!) */
@@ -1462,43 +1462,6 @@ typedef struct SpecialJoinInfo
} SpecialJoinInfo;
/*
- * "Lateral join" info.
- *
- * Lateral references constrain the join order in a way that's somewhat like
- * outer joins, though different in detail. We construct a LateralJoinInfo
- * for each lateral cross-reference, placing them in the PlannerInfo node's
- * lateral_info_list.
- *
- * For unflattened LATERAL RTEs, we generate LateralJoinInfo(s) in which
- * lateral_rhs is the relid of the LATERAL baserel, and lateral_lhs is a set
- * of relids of baserels it references, all of which must be present on the
- * LHS to compute a parameter needed by the RHS. Typically, lateral_lhs is
- * a singleton, but it can include multiple rels if the RHS references a
- * PlaceHolderVar with a multi-rel ph_eval_at level. We disallow joining to
- * only part of the LHS in such cases, since that would result in a join tree
- * with no convenient place to compute the PHV.
- *
- * When an appendrel contains lateral references (eg "LATERAL (SELECT x.col1
- * UNION ALL SELECT y.col2)"), the LateralJoinInfos reference the parent
- * baserel not the member otherrels, since it is the parent relid that is
- * considered for joining purposes.
- *
- * If any LATERAL RTEs were flattened into the parent query, it is possible
- * that the query now contains PlaceHolderVars containing lateral references,
- * representing expressions that need to be evaluated at particular spots in
- * the jointree but contain lateral references to Vars from elsewhere. These
- * give rise to LateralJoinInfos in which lateral_rhs is the evaluation point
- * of a PlaceHolderVar and lateral_lhs is the set of lateral rels it needs.
- */
-
-typedef struct LateralJoinInfo
-{
- NodeTag type;
- Relids lateral_lhs; /* rels needed to compute a lateral value */
- Relids lateral_rhs; /* rel where lateral value is needed */
-} LateralJoinInfo;
-
-/*
* Append-relation info.
*
* When we expand an inheritable table or a UNION-ALL subselect into an