PostgreSQL Source Code  git master
plannodes.h File Reference
#include "access/sdir.h"
#include "access/stratnum.h"
#include "common/relpath.h"
#include "lib/stringinfo.h"
#include "nodes/bitmapset.h"
#include "nodes/lockoptions.h"
#include "nodes/primnodes.h"
Include dependency graph for plannodes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PlannedStmt
 
struct  Plan
 
struct  Result
 
struct  ProjectSet
 
struct  ModifyTable
 
struct  Append
 
struct  MergeAppend
 
struct  RecursiveUnion
 
struct  BitmapAnd
 
struct  BitmapOr
 
struct  Scan
 
struct  SeqScan
 
struct  SampleScan
 
struct  IndexScan
 
struct  IndexOnlyScan
 
struct  BitmapIndexScan
 
struct  BitmapHeapScan
 
struct  TidScan
 
struct  TidRangeScan
 
struct  SubqueryScan
 
struct  FunctionScan
 
struct  ValuesScan
 
struct  TableFuncScan
 
struct  CteScan
 
struct  NamedTuplestoreScan
 
struct  WorkTableScan
 
struct  ForeignScan
 
struct  CustomScan
 
struct  Join
 
struct  NestLoop
 
struct  NestLoopParam
 
struct  MergeJoin
 
struct  HashJoin
 
struct  Material
 
struct  Memoize
 
struct  Sort
 
struct  IncrementalSort
 
struct  Group
 
struct  Agg
 
struct  WindowAgg
 
struct  Unique
 
struct  Gather
 
struct  GatherMerge
 
struct  Hash
 
struct  SetOp
 
struct  LockRows
 
struct  Limit
 
struct  PlanRowMark
 
struct  PartitionPruneInfo
 
struct  PartitionedRelPruneInfo
 
struct  PartitionPruneStep
 
struct  PartitionPruneStepOp
 
struct  PartitionPruneStepCombine
 
struct  PlanInvalItem
 

Macros

#define exec_subplan_get_plan(plannedstmt, subplan)    ((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))
 
#define innerPlan(node)   (((Plan *)(node))->righttree)
 
#define outerPlan(node)   (((Plan *)(node))->lefttree)
 
#define RowMarkRequiresRowShareLock(marktype)   ((marktype) <= ROW_MARK_KEYSHARE)
 

Typedefs

typedef struct PlannedStmt PlannedStmt
 
typedef struct Plan Plan
 
typedef struct Result Result
 
typedef struct ProjectSet ProjectSet
 
typedef struct ModifyTable ModifyTable
 
typedef struct Append Append
 
typedef struct MergeAppend MergeAppend
 
typedef struct RecursiveUnion RecursiveUnion
 
typedef struct BitmapAnd BitmapAnd
 
typedef struct BitmapOr BitmapOr
 
typedef struct Scan Scan
 
typedef struct SeqScan SeqScan
 
typedef struct SampleScan SampleScan
 
typedef struct IndexScan IndexScan
 
typedef struct IndexOnlyScan IndexOnlyScan
 
typedef struct BitmapIndexScan BitmapIndexScan
 
typedef struct BitmapHeapScan BitmapHeapScan
 
typedef struct TidScan TidScan
 
typedef struct TidRangeScan TidRangeScan
 
typedef enum SubqueryScanStatus SubqueryScanStatus
 
typedef struct SubqueryScan SubqueryScan
 
typedef struct FunctionScan FunctionScan
 
typedef struct ValuesScan ValuesScan
 
typedef struct TableFuncScan TableFuncScan
 
typedef struct CteScan CteScan
 
typedef struct NamedTuplestoreScan NamedTuplestoreScan
 
typedef struct WorkTableScan WorkTableScan
 
typedef struct ForeignScan ForeignScan
 
typedef struct CustomScan CustomScan
 
typedef struct Join Join
 
typedef struct NestLoop NestLoop
 
typedef struct NestLoopParam NestLoopParam
 
typedef struct MergeJoin MergeJoin
 
typedef struct HashJoin HashJoin
 
typedef struct Material Material
 
typedef struct Memoize Memoize
 
typedef struct Sort Sort
 
typedef struct IncrementalSort IncrementalSort
 
typedef struct Group Group
 
typedef struct Agg Agg
 
typedef struct WindowAgg WindowAgg
 
typedef struct Unique Unique
 
typedef struct Gather Gather
 
typedef struct GatherMerge GatherMerge
 
typedef struct Hash Hash
 
typedef struct SetOp SetOp
 
typedef struct LockRows LockRows
 
typedef struct Limit Limit
 
typedef enum RowMarkType RowMarkType
 
typedef struct PlanRowMark PlanRowMark
 
typedef struct PartitionPruneInfo PartitionPruneInfo
 
typedef struct PartitionedRelPruneInfo PartitionedRelPruneInfo
 
typedef struct PartitionPruneStep PartitionPruneStep
 
typedef struct PartitionPruneStepOp PartitionPruneStepOp
 
typedef enum PartitionPruneCombineOp PartitionPruneCombineOp
 
typedef struct PartitionPruneStepCombine PartitionPruneStepCombine
 
typedef struct PlanInvalItem PlanInvalItem
 
typedef enum MonotonicFunction MonotonicFunction
 

Enumerations

enum  SubqueryScanStatus { SUBQUERY_SCAN_UNKNOWN , SUBQUERY_SCAN_TRIVIAL , SUBQUERY_SCAN_NONTRIVIAL }
 
enum  RowMarkType {
  ROW_MARK_EXCLUSIVE , ROW_MARK_NOKEYEXCLUSIVE , ROW_MARK_SHARE , ROW_MARK_KEYSHARE ,
  ROW_MARK_REFERENCE , ROW_MARK_COPY
}
 
enum  PartitionPruneCombineOp { PARTPRUNE_COMBINE_UNION , PARTPRUNE_COMBINE_INTERSECT }
 
enum  MonotonicFunction { MONOTONICFUNC_NONE = 0 , MONOTONICFUNC_INCREASING = (1 << 0) , MONOTONICFUNC_DECREASING = (1 << 1) , MONOTONICFUNC_BOTH = MONOTONICFUNC_INCREASING | MONOTONICFUNC_DECREASING }
 

Macro Definition Documentation

◆ exec_subplan_get_plan

#define exec_subplan_get_plan (   plannedstmt,
  subplan 
)     ((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))

Definition at line 103 of file plannodes.h.

◆ innerPlan

#define innerPlan (   node)    (((Plan *)(node))->righttree)

Definition at line 182 of file plannodes.h.

◆ outerPlan

#define outerPlan (   node)    (((Plan *)(node))->lefttree)

Definition at line 183 of file plannodes.h.

◆ RowMarkRequiresRowShareLock

#define RowMarkRequiresRowShareLock (   marktype)    ((marktype) <= ROW_MARK_KEYSHARE)

Definition at line 1338 of file plannodes.h.

Typedef Documentation

◆ Agg

typedef struct Agg Agg

◆ Append

typedef struct Append Append

◆ BitmapAnd

typedef struct BitmapAnd BitmapAnd

◆ BitmapHeapScan

◆ BitmapIndexScan

◆ BitmapOr

typedef struct BitmapOr BitmapOr

◆ CteScan

typedef struct CteScan CteScan

◆ CustomScan

typedef struct CustomScan CustomScan

◆ ForeignScan

typedef struct ForeignScan ForeignScan

◆ FunctionScan

typedef struct FunctionScan FunctionScan

◆ Gather

typedef struct Gather Gather

◆ GatherMerge

typedef struct GatherMerge GatherMerge

◆ Group

typedef struct Group Group

◆ Hash

typedef struct Hash Hash

◆ HashJoin

typedef struct HashJoin HashJoin

◆ IncrementalSort

◆ IndexOnlyScan

typedef struct IndexOnlyScan IndexOnlyScan

◆ IndexScan

typedef struct IndexScan IndexScan

◆ Join

typedef struct Join Join

◆ Limit

typedef struct Limit Limit

◆ LockRows

typedef struct LockRows LockRows

◆ Material

typedef struct Material Material

◆ Memoize

typedef struct Memoize Memoize

◆ MergeAppend

typedef struct MergeAppend MergeAppend

◆ MergeJoin

typedef struct MergeJoin MergeJoin

◆ ModifyTable

typedef struct ModifyTable ModifyTable

◆ MonotonicFunction

◆ NamedTuplestoreScan

◆ NestLoop

typedef struct NestLoop NestLoop

◆ NestLoopParam

typedef struct NestLoopParam NestLoopParam

◆ PartitionedRelPruneInfo

◆ PartitionPruneCombineOp

◆ PartitionPruneInfo

◆ PartitionPruneStep

◆ PartitionPruneStepCombine

◆ PartitionPruneStepOp

◆ Plan

typedef struct Plan Plan

◆ PlanInvalItem

typedef struct PlanInvalItem PlanInvalItem

◆ PlannedStmt

typedef struct PlannedStmt PlannedStmt

◆ PlanRowMark

typedef struct PlanRowMark PlanRowMark

◆ ProjectSet

typedef struct ProjectSet ProjectSet

◆ RecursiveUnion

◆ Result

typedef struct Result Result

◆ RowMarkType

typedef enum RowMarkType RowMarkType

◆ SampleScan

typedef struct SampleScan SampleScan

◆ Scan

typedef struct Scan Scan

◆ SeqScan

typedef struct SeqScan SeqScan

◆ SetOp

typedef struct SetOp SetOp

◆ Sort

typedef struct Sort Sort

◆ SubqueryScan

typedef struct SubqueryScan SubqueryScan

◆ SubqueryScanStatus

◆ TableFuncScan

typedef struct TableFuncScan TableFuncScan

◆ TidRangeScan

typedef struct TidRangeScan TidRangeScan

◆ TidScan

typedef struct TidScan TidScan

◆ Unique

typedef struct Unique Unique

◆ ValuesScan

typedef struct ValuesScan ValuesScan

◆ WindowAgg

typedef struct WindowAgg WindowAgg

◆ WorkTableScan

typedef struct WorkTableScan WorkTableScan

Enumeration Type Documentation

◆ MonotonicFunction

Enumerator
MONOTONICFUNC_NONE 
MONOTONICFUNC_INCREASING 
MONOTONICFUNC_DECREASING 
MONOTONICFUNC_BOTH 

Definition at line 1586 of file plannodes.h.

1587 {
1588  MONOTONICFUNC_NONE = 0,
1589  MONOTONICFUNC_INCREASING = (1 << 0),
1590  MONOTONICFUNC_DECREASING = (1 << 1),
MonotonicFunction
Definition: plannodes.h:1587
@ MONOTONICFUNC_NONE
Definition: plannodes.h:1588
@ MONOTONICFUNC_DECREASING
Definition: plannodes.h:1590
@ MONOTONICFUNC_INCREASING
Definition: plannodes.h:1589
@ MONOTONICFUNC_BOTH
Definition: plannodes.h:1591

◆ PartitionPruneCombineOp

Enumerator
PARTPRUNE_COMBINE_UNION 
PARTPRUNE_COMBINE_INTERSECT 

Definition at line 1544 of file plannodes.h.

1545 {
PartitionPruneCombineOp
Definition: plannodes.h:1545
@ PARTPRUNE_COMBINE_INTERSECT
Definition: plannodes.h:1547
@ PARTPRUNE_COMBINE_UNION
Definition: plannodes.h:1546

◆ RowMarkType

Enumerator
ROW_MARK_EXCLUSIVE 
ROW_MARK_NOKEYEXCLUSIVE 
ROW_MARK_SHARE 
ROW_MARK_KEYSHARE 
ROW_MARK_REFERENCE 
ROW_MARK_COPY 

Definition at line 1328 of file plannodes.h.

1329 {
1330  ROW_MARK_EXCLUSIVE, /* obtain exclusive tuple lock */
1331  ROW_MARK_NOKEYEXCLUSIVE, /* obtain no-key exclusive tuple lock */
1332  ROW_MARK_SHARE, /* obtain shared tuple lock */
1333  ROW_MARK_KEYSHARE, /* obtain keyshare tuple lock */
1334  ROW_MARK_REFERENCE, /* just fetch the TID, don't lock it */
1335  ROW_MARK_COPY, /* physically copy the row value */
1336 } RowMarkType;
RowMarkType
Definition: plannodes.h:1329
@ ROW_MARK_COPY
Definition: plannodes.h:1335
@ ROW_MARK_REFERENCE
Definition: plannodes.h:1334
@ ROW_MARK_SHARE
Definition: plannodes.h:1332
@ ROW_MARK_EXCLUSIVE
Definition: plannodes.h:1330
@ ROW_MARK_NOKEYEXCLUSIVE
Definition: plannodes.h:1331
@ ROW_MARK_KEYSHARE
Definition: plannodes.h:1333

◆ SubqueryScanStatus

Enumerator
SUBQUERY_SCAN_UNKNOWN 
SUBQUERY_SCAN_TRIVIAL 
SUBQUERY_SCAN_NONTRIVIAL 

Definition at line 592 of file plannodes.h.

593 {
SubqueryScanStatus
Definition: plannodes.h:593
@ SUBQUERY_SCAN_NONTRIVIAL
Definition: plannodes.h:596
@ SUBQUERY_SCAN_UNKNOWN
Definition: plannodes.h:594
@ SUBQUERY_SCAN_TRIVIAL
Definition: plannodes.h:595