PostgreSQL Source Code  git master
pathnodes.h File Reference
#include "access/sdir.h"
#include "lib/stringinfo.h"
#include "nodes/params.h"
#include "nodes/parsenodes.h"
#include "storage/block.h"
Include dependency graph for pathnodes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  QualCost
 
struct  AggClauseCosts
 
struct  PlannerGlobal
 
struct  PlannerInfo
 
struct  PartitionSchemeData
 
struct  RelOptInfo
 
struct  IndexOptInfo
 
struct  ForeignKeyOptInfo
 
struct  StatisticExtInfo
 
struct  JoinDomain
 
struct  EquivalenceClass
 
struct  EquivalenceMember
 
struct  PathKey
 
struct  GroupByOrdering
 
struct  PathTarget
 
struct  ParamPathInfo
 
struct  Path
 
struct  IndexPath
 
struct  IndexClause
 
struct  BitmapHeapPath
 
struct  BitmapAndPath
 
struct  BitmapOrPath
 
struct  TidPath
 
struct  TidRangePath
 
struct  SubqueryScanPath
 
struct  ForeignPath
 
struct  CustomPath
 
struct  AppendPath
 
struct  MergeAppendPath
 
struct  GroupResultPath
 
struct  MaterialPath
 
struct  MemoizePath
 
struct  UniquePath
 
struct  GatherPath
 
struct  GatherMergePath
 
struct  JoinPath
 
struct  NestPath
 
struct  MergePath
 
struct  HashPath
 
struct  ProjectionPath
 
struct  ProjectSetPath
 
struct  SortPath
 
struct  IncrementalSortPath
 
struct  GroupPath
 
struct  UpperUniquePath
 
struct  AggPath
 
struct  GroupingSetData
 
struct  RollupData
 
struct  GroupingSetsPath
 
struct  MinMaxAggPath
 
struct  WindowAggPath
 
struct  SetOpPath
 
struct  RecursiveUnionPath
 
struct  LockRowsPath
 
struct  ModifyTablePath
 
struct  LimitPath
 
struct  RestrictInfo
 
struct  MergeScanSelCache
 
struct  PlaceHolderVar
 
struct  SpecialJoinInfo
 
struct  OuterJoinClauseInfo
 
struct  AppendRelInfo
 
struct  RowIdentityVarInfo
 
struct  PlaceHolderInfo
 
struct  MinMaxAggInfo
 
struct  PlannerParamItem
 
struct  SemiAntiJoinFactors
 
struct  JoinPathExtraData
 
struct  GroupPathExtraData
 
struct  FinalPathExtraData
 
struct  JoinCostWorkspace
 
struct  AggInfo
 
struct  AggTransInfo
 

Macros

#define planner_subplan_get_plan(root, subplan)    ((Plan *) list_nth((root)->glob->subplans, (subplan)->plan_id - 1))
 
#define HAVE_PLANNERINFO_TYPEDEF   1
 
#define planner_rt_fetch(rti, root)
 
#define AMFLAG_HAS_TID_RANGE   (1 << 0)
 
#define IS_SIMPLE_REL(rel)
 
#define IS_JOIN_REL(rel)
 
#define IS_UPPER_REL(rel)
 
#define IS_OTHER_REL(rel)
 
#define IS_PARTITIONED_REL(rel)
 
#define REL_HAS_ALL_PART_PROPS(rel)
 
#define HAVE_INDEXOPTINFO_TYPEDEF   1
 
#define EC_MUST_BE_REDUNDANT(eclass)    ((eclass)->ec_has_const)
 
#define get_pathtarget_sortgroupref(target, colno)    ((target)->sortgrouprefs ? (target)->sortgrouprefs[colno] : (Index) 0)
 
#define PATH_REQ_OUTER(path)    ((path)->param_info ? (path)->param_info->ppi_req_outer : (Relids) NULL)
 
#define IS_DUMMY_APPEND(p)    (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL)
 
#define IS_DUMMY_REL(r)   is_dummy_rel(r)
 
#define RINFO_IS_PUSHED_DOWN(rinfo, joinrelids)
 
#define HAVE_SPECIALJOININFO_TYPEDEF   1
 
#define GROUPING_CAN_USE_SORT   0x0001
 
#define GROUPING_CAN_USE_HASH   0x0002
 
#define GROUPING_CAN_PARTIAL_AGG   0x0004
 

Typedefs

typedef BitmapsetRelids
 
typedef enum CostSelector CostSelector
 
typedef struct QualCost QualCost
 
typedef struct AggClauseCosts AggClauseCosts
 
typedef enum UpperRelationKind UpperRelationKind
 
typedef struct PlannerGlobal PlannerGlobal
 
typedef struct PlannerInfo PlannerInfo
 
typedef struct PartitionSchemeData PartitionSchemeData
 
typedef struct PartitionSchemeDataPartitionScheme
 
typedef enum RelOptKind RelOptKind
 
typedef struct RelOptInfo RelOptInfo
 
typedef struct IndexOptInfo IndexOptInfo
 
typedef struct ForeignKeyOptInfo ForeignKeyOptInfo
 
typedef struct StatisticExtInfo StatisticExtInfo
 
typedef struct JoinDomain JoinDomain
 
typedef struct EquivalenceClass EquivalenceClass
 
typedef struct EquivalenceMember EquivalenceMember
 
typedef struct PathKey PathKey
 
typedef struct GroupByOrdering GroupByOrdering
 
typedef enum VolatileFunctionStatus VolatileFunctionStatus
 
typedef struct PathTarget PathTarget
 
typedef struct ParamPathInfo ParamPathInfo
 
typedef struct Path Path
 
typedef struct IndexPath IndexPath
 
typedef struct IndexClause IndexClause
 
typedef struct BitmapHeapPath BitmapHeapPath
 
typedef struct BitmapAndPath BitmapAndPath
 
typedef struct BitmapOrPath BitmapOrPath
 
typedef struct TidPath TidPath
 
typedef struct TidRangePath TidRangePath
 
typedef struct SubqueryScanPath SubqueryScanPath
 
typedef struct ForeignPath ForeignPath
 
typedef struct CustomPath CustomPath
 
typedef struct AppendPath AppendPath
 
typedef struct MergeAppendPath MergeAppendPath
 
typedef struct GroupResultPath GroupResultPath
 
typedef struct MaterialPath MaterialPath
 
typedef struct MemoizePath MemoizePath
 
typedef enum UniquePathMethod UniquePathMethod
 
typedef struct UniquePath UniquePath
 
typedef struct GatherPath GatherPath
 
typedef struct GatherMergePath GatherMergePath
 
typedef struct JoinPath JoinPath
 
typedef struct NestPath NestPath
 
typedef struct MergePath MergePath
 
typedef struct HashPath HashPath
 
typedef struct ProjectionPath ProjectionPath
 
typedef struct ProjectSetPath ProjectSetPath
 
typedef struct SortPath SortPath
 
typedef struct IncrementalSortPath IncrementalSortPath
 
typedef struct GroupPath GroupPath
 
typedef struct UpperUniquePath UpperUniquePath
 
typedef struct AggPath AggPath
 
typedef struct GroupingSetData GroupingSetData
 
typedef struct RollupData RollupData
 
typedef struct GroupingSetsPath GroupingSetsPath
 
typedef struct MinMaxAggPath MinMaxAggPath
 
typedef struct WindowAggPath WindowAggPath
 
typedef struct SetOpPath SetOpPath
 
typedef struct RecursiveUnionPath RecursiveUnionPath
 
typedef struct LockRowsPath LockRowsPath
 
typedef struct ModifyTablePath ModifyTablePath
 
typedef struct LimitPath LimitPath
 
typedef struct RestrictInfo RestrictInfo
 
typedef struct MergeScanSelCache MergeScanSelCache
 
typedef struct PlaceHolderVar PlaceHolderVar
 
typedef struct SpecialJoinInfo SpecialJoinInfo
 
typedef struct OuterJoinClauseInfo OuterJoinClauseInfo
 
typedef struct AppendRelInfo AppendRelInfo
 
typedef struct RowIdentityVarInfo RowIdentityVarInfo
 
typedef struct PlaceHolderInfo PlaceHolderInfo
 
typedef struct MinMaxAggInfo MinMaxAggInfo
 
typedef struct PlannerParamItem PlannerParamItem
 
typedef struct SemiAntiJoinFactors SemiAntiJoinFactors
 
typedef struct JoinPathExtraData JoinPathExtraData
 
typedef struct JoinCostWorkspace JoinCostWorkspace
 
typedef struct AggInfo AggInfo
 
typedef struct AggTransInfo AggTransInfo
 

Enumerations

enum  CostSelector { STARTUP_COST , TOTAL_COST }
 
enum  UpperRelationKind {
  UPPERREL_SETOP , UPPERREL_PARTIAL_GROUP_AGG , UPPERREL_GROUP_AGG , UPPERREL_WINDOW ,
  UPPERREL_PARTIAL_DISTINCT , UPPERREL_DISTINCT , UPPERREL_ORDERED , UPPERREL_FINAL
}
 
enum  RelOptKind {
  RELOPT_BASEREL , RELOPT_JOINREL , RELOPT_OTHER_MEMBER_REL , RELOPT_OTHER_JOINREL ,
  RELOPT_UPPER_REL , RELOPT_OTHER_UPPER_REL
}
 
enum  VolatileFunctionStatus { VOLATILITY_UNKNOWN = 0 , VOLATILITY_VOLATILE , VOLATILITY_NOVOLATILE }
 
enum  UniquePathMethod { UNIQUE_PATH_NOOP , UNIQUE_PATH_HASH , UNIQUE_PATH_SORT }
 
enum  PartitionwiseAggregateType { PARTITIONWISE_AGGREGATE_NONE , PARTITIONWISE_AGGREGATE_FULL , PARTITIONWISE_AGGREGATE_PARTIAL }
 

Functions

bool is_dummy_rel (RelOptInfo *rel)
 

Macro Definition Documentation

◆ AMFLAG_HAS_TID_RANGE

#define AMFLAG_HAS_TID_RANGE   (1 << 0)

Definition at line 823 of file pathnodes.h.

◆ EC_MUST_BE_REDUNDANT

#define EC_MUST_BE_REDUNDANT (   eclass)     ((eclass)->ec_has_const)

Definition at line 1409 of file pathnodes.h.

◆ get_pathtarget_sortgroupref

#define get_pathtarget_sortgroupref (   target,
  colno 
)     ((target)->sortgrouprefs ? (target)->sortgrouprefs[colno] : (Index) 0)

Definition at line 1555 of file pathnodes.h.

◆ GROUPING_CAN_PARTIAL_AGG

#define GROUPING_CAN_PARTIAL_AGG   0x0004

Definition at line 3262 of file pathnodes.h.

◆ GROUPING_CAN_USE_HASH

#define GROUPING_CAN_USE_HASH   0x0002

Definition at line 3261 of file pathnodes.h.

◆ GROUPING_CAN_USE_SORT

#define GROUPING_CAN_USE_SORT   0x0001

Definition at line 3260 of file pathnodes.h.

◆ HAVE_INDEXOPTINFO_TYPEDEF

#define HAVE_INDEXOPTINFO_TYPEDEF   1

Definition at line 1107 of file pathnodes.h.

◆ HAVE_PLANNERINFO_TYPEDEF

#define HAVE_PLANNERINFO_TYPEDEF   1

Definition at line 192 of file pathnodes.h.

◆ HAVE_SPECIALJOININFO_TYPEDEF

#define HAVE_SPECIALJOININFO_TYPEDEF   1

Definition at line 2893 of file pathnodes.h.

◆ IS_DUMMY_APPEND

#define IS_DUMMY_APPEND (   p)     (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL)

Definition at line 1945 of file pathnodes.h.

◆ IS_DUMMY_REL

#define IS_DUMMY_REL (   r)    is_dummy_rel(r)

Definition at line 1953 of file pathnodes.h.

◆ IS_JOIN_REL

#define IS_JOIN_REL (   rel)
Value:
((rel)->reloptkind == RELOPT_JOINREL || \
(rel)->reloptkind == RELOPT_OTHER_JOINREL)
@ RELOPT_JOINREL
Definition: pathnodes.h:828
@ RELOPT_OTHER_JOINREL
Definition: pathnodes.h:830

Definition at line 844 of file pathnodes.h.

◆ IS_OTHER_REL

#define IS_OTHER_REL (   rel)
Value:
((rel)->reloptkind == RELOPT_OTHER_MEMBER_REL || \
(rel)->reloptkind == RELOPT_OTHER_JOINREL || \
(rel)->reloptkind == RELOPT_OTHER_UPPER_REL)
@ RELOPT_OTHER_MEMBER_REL
Definition: pathnodes.h:829
@ RELOPT_OTHER_UPPER_REL
Definition: pathnodes.h:832

Definition at line 854 of file pathnodes.h.

◆ IS_PARTITIONED_REL

#define IS_PARTITIONED_REL (   rel)
Value:
((rel)->part_scheme && (rel)->boundinfo && (rel)->nparts > 0 && \
(rel)->part_rels && !IS_DUMMY_REL(rel))
#define IS_DUMMY_REL(r)
Definition: pathnodes.h:1953

Definition at line 1062 of file pathnodes.h.

◆ IS_SIMPLE_REL

#define IS_SIMPLE_REL (   rel)
Value:
((rel)->reloptkind == RELOPT_BASEREL || \
(rel)->reloptkind == RELOPT_OTHER_MEMBER_REL)
@ RELOPT_BASEREL
Definition: pathnodes.h:827

Definition at line 839 of file pathnodes.h.

◆ IS_UPPER_REL

#define IS_UPPER_REL (   rel)
Value:
((rel)->reloptkind == RELOPT_UPPER_REL || \
(rel)->reloptkind == RELOPT_OTHER_UPPER_REL)
@ RELOPT_UPPER_REL
Definition: pathnodes.h:831

Definition at line 849 of file pathnodes.h.

◆ PATH_REQ_OUTER

#define PATH_REQ_OUTER (   path)     ((path)->param_info ? (path)->param_info->ppi_req_outer : (Relids) NULL)

Definition at line 1676 of file pathnodes.h.

◆ planner_rt_fetch

#define planner_rt_fetch (   rti,
  root 
)
Value:
((root)->simple_rte_array ? (root)->simple_rte_array[rti] : \
rt_fetch(rti, (root)->parse->rtable))
tree ctl root
Definition: radixtree.h:1886
static struct subre * parse(struct vars *v, int stopper, int type, struct state *init, struct state *final)
Definition: regcomp.c:715

Definition at line 570 of file pathnodes.h.

◆ planner_subplan_get_plan

#define planner_subplan_get_plan (   root,
  subplan 
)     ((Plan *) list_nth((root)->glob->subplans, (subplan)->plan_id - 1))

Definition at line 169 of file pathnodes.h.

◆ REL_HAS_ALL_PART_PROPS

#define REL_HAS_ALL_PART_PROPS (   rel)
Value:
((rel)->part_scheme && (rel)->boundinfo && (rel)->nparts > 0 && \
(rel)->part_rels && (rel)->partexprs && (rel)->nullable_partexprs)

Definition at line 1070 of file pathnodes.h.

◆ RINFO_IS_PUSHED_DOWN

#define RINFO_IS_PUSHED_DOWN (   rinfo,
  joinrelids 
)
Value:
((rinfo)->is_pushed_down || \
!bms_is_subset((rinfo)->required_relids, joinrelids))
bool bms_is_subset(const Bitmapset *a, const Bitmapset *b)
Definition: bitmapset.c:412

Definition at line 2728 of file pathnodes.h.

Typedef Documentation

◆ AggClauseCosts

◆ AggInfo

typedef struct AggInfo AggInfo

◆ AggPath

typedef struct AggPath AggPath

◆ AggTransInfo

typedef struct AggTransInfo AggTransInfo

◆ AppendPath

typedef struct AppendPath AppendPath

◆ AppendRelInfo

typedef struct AppendRelInfo AppendRelInfo

◆ BitmapAndPath

typedef struct BitmapAndPath BitmapAndPath

◆ BitmapHeapPath

◆ BitmapOrPath

typedef struct BitmapOrPath BitmapOrPath

◆ CostSelector

typedef enum CostSelector CostSelector

◆ CustomPath

typedef struct CustomPath CustomPath

◆ EquivalenceClass

◆ EquivalenceMember

◆ ForeignKeyOptInfo

◆ ForeignPath

typedef struct ForeignPath ForeignPath

◆ GatherMergePath

◆ GatherPath

typedef struct GatherPath GatherPath

◆ GroupByOrdering

◆ GroupingSetData

◆ GroupingSetsPath

◆ GroupPath

typedef struct GroupPath GroupPath

◆ GroupResultPath

◆ HashPath

typedef struct HashPath HashPath

◆ IncrementalSortPath

◆ IndexClause

typedef struct IndexClause IndexClause

◆ IndexOptInfo

typedef struct IndexOptInfo IndexOptInfo

Definition at line 604 of file pathnodes.h.

◆ IndexPath

typedef struct IndexPath IndexPath

◆ JoinCostWorkspace

◆ JoinDomain

typedef struct JoinDomain JoinDomain

◆ JoinPath

typedef struct JoinPath JoinPath

◆ JoinPathExtraData

◆ LimitPath

typedef struct LimitPath LimitPath

◆ LockRowsPath

typedef struct LockRowsPath LockRowsPath

◆ MaterialPath

typedef struct MaterialPath MaterialPath

◆ MemoizePath

typedef struct MemoizePath MemoizePath

◆ MergeAppendPath

◆ MergePath

typedef struct MergePath MergePath

◆ MergeScanSelCache

◆ MinMaxAggInfo

typedef struct MinMaxAggInfo MinMaxAggInfo

◆ MinMaxAggPath

typedef struct MinMaxAggPath MinMaxAggPath

◆ ModifyTablePath

◆ NestPath

typedef struct NestPath NestPath

◆ OuterJoinClauseInfo

◆ ParamPathInfo

typedef struct ParamPathInfo ParamPathInfo

◆ PartitionScheme

Definition at line 604 of file pathnodes.h.

◆ PartitionSchemeData

◆ Path

typedef struct Path Path

◆ PathKey

typedef struct PathKey PathKey

◆ PathTarget

typedef struct PathTarget PathTarget

◆ PlaceHolderInfo

◆ PlaceHolderVar

◆ PlannerGlobal

typedef struct PlannerGlobal PlannerGlobal

◆ PlannerInfo

typedef struct PlannerInfo PlannerInfo

Definition at line 30 of file pathnodes.h.

◆ PlannerParamItem

◆ ProjectionPath

◆ ProjectSetPath

◆ QualCost

typedef struct QualCost QualCost

◆ RecursiveUnionPath

◆ Relids

typedef Bitmapset* Relids

Definition at line 30 of file pathnodes.h.

◆ RelOptInfo

typedef struct RelOptInfo RelOptInfo

◆ RelOptKind

typedef enum RelOptKind RelOptKind

◆ RestrictInfo

typedef struct RestrictInfo RestrictInfo

◆ RollupData

typedef struct RollupData RollupData

◆ RowIdentityVarInfo

◆ SemiAntiJoinFactors

◆ SetOpPath

typedef struct SetOpPath SetOpPath

◆ SortPath

typedef struct SortPath SortPath

◆ SpecialJoinInfo

Definition at line 1954 of file pathnodes.h.

◆ StatisticExtInfo

◆ SubqueryScanPath

◆ TidPath

typedef struct TidPath TidPath

◆ TidRangePath

typedef struct TidRangePath TidRangePath

◆ UniquePath

typedef struct UniquePath UniquePath

◆ UniquePathMethod

◆ UpperRelationKind

◆ UpperUniquePath

◆ VolatileFunctionStatus

◆ WindowAggPath

typedef struct WindowAggPath WindowAggPath

Enumeration Type Documentation

◆ CostSelector

Enumerator
STARTUP_COST 
TOTAL_COST 

Definition at line 36 of file pathnodes.h.

37 {
39 } CostSelector;
CostSelector
Definition: pathnodes.h:37
@ TOTAL_COST
Definition: pathnodes.h:38
@ STARTUP_COST
Definition: pathnodes.h:38

◆ PartitionwiseAggregateType

Enumerator
PARTITIONWISE_AGGREGATE_NONE 
PARTITIONWISE_AGGREGATE_FULL 
PARTITIONWISE_AGGREGATE_PARTIAL 

Definition at line 3275 of file pathnodes.h.

3276 {
PartitionwiseAggregateType
Definition: pathnodes.h:3276
@ PARTITIONWISE_AGGREGATE_PARTIAL
Definition: pathnodes.h:3279
@ PARTITIONWISE_AGGREGATE_FULL
Definition: pathnodes.h:3278
@ PARTITIONWISE_AGGREGATE_NONE
Definition: pathnodes.h:3277

◆ RelOptKind

enum RelOptKind
Enumerator
RELOPT_BASEREL 
RELOPT_JOINREL 
RELOPT_OTHER_MEMBER_REL 
RELOPT_OTHER_JOINREL 
RELOPT_UPPER_REL 
RELOPT_OTHER_UPPER_REL 

Definition at line 825 of file pathnodes.h.

◆ UniquePathMethod

Enumerator
UNIQUE_PATH_NOOP 
UNIQUE_PATH_HASH 
UNIQUE_PATH_SORT 

Definition at line 2025 of file pathnodes.h.

2026 {
2027  UNIQUE_PATH_NOOP, /* input is known unique already */
2028  UNIQUE_PATH_HASH, /* use hashing */
2029  UNIQUE_PATH_SORT, /* use sorting */
UniquePathMethod
Definition: pathnodes.h:2026
@ UNIQUE_PATH_SORT
Definition: pathnodes.h:2029
@ UNIQUE_PATH_NOOP
Definition: pathnodes.h:2027
@ UNIQUE_PATH_HASH
Definition: pathnodes.h:2028

◆ UpperRelationKind

Enumerator
UPPERREL_SETOP 
UPPERREL_PARTIAL_GROUP_AGG 
UPPERREL_GROUP_AGG 
UPPERREL_WINDOW 
UPPERREL_PARTIAL_DISTINCT 
UPPERREL_DISTINCT 
UPPERREL_ORDERED 
UPPERREL_FINAL 

Definition at line 69 of file pathnodes.h.

70 {
71  UPPERREL_SETOP, /* result of UNION/INTERSECT/EXCEPT, if any */
72  UPPERREL_PARTIAL_GROUP_AGG, /* result of partial grouping/aggregation, if
73  * any */
74  UPPERREL_GROUP_AGG, /* result of grouping/aggregation, if any */
75  UPPERREL_WINDOW, /* result of window functions, if any */
76  UPPERREL_PARTIAL_DISTINCT, /* result of partial "SELECT DISTINCT", if any */
77  UPPERREL_DISTINCT, /* result of "SELECT DISTINCT", if any */
78  UPPERREL_ORDERED, /* result of ORDER BY, if any */
79  UPPERREL_FINAL, /* result of any remaining top-level actions */
80  /* NB: UPPERREL_FINAL must be last enum entry; it's used to size arrays */
UpperRelationKind
Definition: pathnodes.h:70
@ UPPERREL_SETOP
Definition: pathnodes.h:71
@ UPPERREL_GROUP_AGG
Definition: pathnodes.h:74
@ UPPERREL_FINAL
Definition: pathnodes.h:79
@ UPPERREL_DISTINCT
Definition: pathnodes.h:77
@ UPPERREL_PARTIAL_GROUP_AGG
Definition: pathnodes.h:72
@ UPPERREL_ORDERED
Definition: pathnodes.h:78
@ UPPERREL_WINDOW
Definition: pathnodes.h:75
@ UPPERREL_PARTIAL_DISTINCT
Definition: pathnodes.h:76

◆ VolatileFunctionStatus

Enumerator
VOLATILITY_UNKNOWN 
VOLATILITY_VOLATILE 
VOLATILITY_NOVOLATILE 

Definition at line 1502 of file pathnodes.h.

1503 {
1504  VOLATILITY_UNKNOWN = 0,
VolatileFunctionStatus
Definition: pathnodes.h:1503
@ VOLATILITY_NOVOLATILE
Definition: pathnodes.h:1506
@ VOLATILITY_UNKNOWN
Definition: pathnodes.h:1504
@ VOLATILITY_VOLATILE
Definition: pathnodes.h:1505

Function Documentation

◆ is_dummy_rel()

bool is_dummy_rel ( RelOptInfo rel)

Definition at line 1335 of file joinrels.c.

1336 {
1337  Path *path;
1338 
1339  /*
1340  * A rel that is known dummy will have just one path that is a childless
1341  * Append. (Even if somehow it has more paths, a childless Append will
1342  * have cost zero and hence should be at the front of the pathlist.)
1343  */
1344  if (rel->pathlist == NIL)
1345  return false;
1346  path = (Path *) linitial(rel->pathlist);
1347 
1348  /*
1349  * Initially, a dummy path will just be a childless Append. But in later
1350  * planning stages we might stick a ProjectSetPath and/or ProjectionPath
1351  * on top, since Append can't project. Rather than make assumptions about
1352  * which combinations can occur, just descend through whatever we find.
1353  */
1354  for (;;)
1355  {
1356  if (IsA(path, ProjectionPath))
1357  path = ((ProjectionPath *) path)->subpath;
1358  else if (IsA(path, ProjectSetPath))
1359  path = ((ProjectSetPath *) path)->subpath;
1360  else
1361  break;
1362  }
1363  if (IS_DUMMY_APPEND(path))
1364  return true;
1365  return false;
1366 }
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:310
#define IsA(nodeptr, _type_)
Definition: nodes.h:158
#define IS_DUMMY_APPEND(p)
Definition: pathnodes.h:1945
#define NIL
Definition: pg_list.h:68
#define linitial(l)
Definition: pg_list.h:178
List * pathlist
Definition: pathnodes.h:898

References IS_DUMMY_APPEND, IsA, linitial, NIL, RelOptInfo::pathlist, and subpath().

Referenced by make_join_rel(), mark_dummy_rel(), and populate_joinrel_with_paths().