Postgres 做计算时 Node 的状态

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

executor/hashjoin.h
executor/nodeHashjoin.h
executor/nodeMergejoin.h

src/include/datatype/ timestamp.h 该目录下只包含一个 时间相关的 数据类型

src/include/storage/

src/include/optimizer 优化器相关

src/include/replication 复制备份相关

src/include/executor 执行器相关的定义

src/include/catalog 元数据相关

src/include/access 访问相关,包括 各种索引类型等。

src/include/utils 快照,元祖排序, 各种数据类型等。

nodes 目录下的文件说明

values.h       Value(值)节点的类型, 如 Float,整形,Inter,String,BitString,Null
relation.h    查询树的  内部数据结构   Definitions for planner's internal data structures.
replnodes.h    复制语法解析结构定义  definitions for replication grammar parse nodes
tidbitmap.h    元祖bitmap 相关的包  PostgreSQL tuple-id (TID) bitmap package
bitmapset.h    PostgreSQL tuple-id (TID) bitmap package
lockoptions.h  通用头部,用于锁相关的声明   Common header for some locking-related declarations.
execnodes.h    执行状态节点定义   definitions for executor state nodes
extensible.h   拓展节点和用户自定义查询    Definitions for extensible nodes and custom scans

makefuncs.h    创建函数的原型   prototypes for the creator functions (for primitive nodes)
memnodes.h     内存上下文节点 定义    POSTGRES memory context node definitions.
nodeFuncs.h    节点树的各种通用操作     query_tree_walker   遍历。
nodes.h        标记节点的定义。
params.h      支持查找与Param节点关联的值。
parsenodes.h   解析树节点的定义
plannodes.h    查询计划节点的定义
readfuncs.h   read.c和readfuncs.c的头文件。 这些功能是内部的到stringToNode接口,不应该被其他人(在其他地方)使用。

* pg_list.h
    * PostgreSQL通用链表包的接口

rg typedef src/include/nodes/execnodes.h

typedef struct AggrefExprState
typedef struct WindowFuncExprState
typedef struct SetExprState
typedef struct SubPlanState
typedef struct AlternativeSubPlanState
typedef enum DomainConstraintType
typedef struct DomainConstraintState
typedef TupleTableSlot *(*ExecProcNodeMtd) (struct PlanState *p
typedef struct PlanState
typedef struct EPQState
typedef struct ResultState
typedef struct ProjectSetState
typedef struct ModifyTableState
typedef struct AppendState
typedef struct MergeAppendState
typedef struct RecursiveUnionState
typedef struct BitmapAndState
typedef struct BitmapOrState
typedef struct ScanState
:typedef struct SeqScanState
:typedef struct SampleScanState
:typedef struct
:typedef struct
:typedef struct IndexScanState
:typedef struct IndexOnlyScanState
:typedef struct BitmapIndexScanState
:typedef enum
:typedef struct ParallelBitmapHeapState
:typedef struct BitmapHeapScanState
:typedef struct TidScanState
:typedef struct SubqueryScanState
:typedef struct FunctionScanState
:typedef struct ValuesScanState
:typedef struct TableFuncScanState
:typedef struct CteScanState
:typedef struct NamedTuplestoreScanState
:typedef struct WorkTableScanState
:typedef struct ForeignScanState
:typedef struct CustomScanState
:typedef struct JoinState
:typedef struct NestLoopState
:typedef struct MergeJoinClauseData *MergeJoinClause;
:typedef struct MergeJoinState
:typedef struct HashJoinTupleData *HashJoinTuple;
:typedef struct HashJoinTableData *HashJoinTable;
:typedef struct HashJoinState
:typedef struct MaterialState
:typedef struct SortState
:typedef struct GroupState
:typedef struct AggStatePerAggData *AggStatePerAgg;
:typedef struct AggStatePerTransData *AggStatePerTrans;
:typedef struct AggStatePerGroupData *AggStatePerGroup;
:typedef struct AggStatePerPhaseData *AggStatePerPhase;
:typedef struct AggStatePerHashData *AggStatePerHash;
:typedef struct AggState
:typedef struct WindowStatePerFuncData *WindowStatePerFunc;
:typedef struct WindowStatePerAggData *WindowStatePerAgg;
:typedef struct WindowAggState
:typedef struct UniqueState
:typedef struct GatherState
:typedef struct GatherMergeState
:typedef struct HashState
:typedef struct SetOpStatePerGroupData *SetOpStatePerGroup;
:typedef struct SetOpState
:typedef struct LockRowsState
:typedef enum
typedef struct LimitState

LIMIT 计算

  typedef enum
  {
      LIMIT_INITIAL,              /* initial state for LIMIT node */   初始化 LIMIT 节点
      LIMIT_RESCAN,               /* rescan after recomputing parameters   重新扫描,在计算参数后     */
      LIMIT_EMPTY,                /* there are no returnable rows        没有返回 rows */
      LIMIT_INWINDOW,             /* have returned a row in the window   在窗口中返回一行*/
      LIMIT_SUBPLANEOF,           /* at EOF of subplan (within window)   子查询计划 终止 */
      LIMIT_WINDOWEND,            /* stepped off end of window           在窗口中 走下*/
      LIMIT_WINDOWSTART           /* stepped off beginning of window     在窗口中开始 */
  } LimitStateCond;

查询中的 原始类型

typedef struct Alias
typedef enum OnCommitAction
typedef struct RangeVar
typedef struct TableFunc
typedef struct IntoClause
typedef struct Expr
typedef struct Var
typedef struct Const
typedef enum ParamKind
typedef struct Param
typedef struct Aggref
typedef struct GroupingFunc
typedef struct WindowFunc
typedef struct ArrayRef
typedef enum CoercionContext
typedef enum CoercionForm
typedef struct FuncExpr
typedef struct NamedArgExpr
typedef struct OpExpr
typedef OpExpr DistinctExpr;
typedef OpExpr NullIfExpr;
typedef struct ScalarArrayOpExpr
typedef enum BoolExprType
typedef struct BoolExpr
typedef enum SubLinkType
typedef struct SubLink
typedef struct SubPlan
typedef struct AlternativeSubPlan
typedef struct FieldSelect
typedef struct FieldStore
typedef struct RelabelType
typedef struct CoerceViaIO
typedef struct ArrayCoerceExpr
typedef struct ConvertRowtypeExpr
typedef struct CollateExpr
typedef struct CaseExpr
typedef struct CaseWhen
typedef struct CaseTestExpr
typedef struct ArrayExpr
typedef struct RowExpr
typedef enum RowCompareType
typedef struct RowCompareExpr
typedef struct CoalesceExpr
typedef enum MinMaxOp
typedef struct MinMaxExpr
typedef enum SQLValueFunctionOp
typedef struct SQLValueFunction
typedef enum XmlExprOp
typedef enum
typedef struct XmlExpr
typedef enum NullTestType
typedef struct NullTest
typedef enum BoolTestType
typedef struct BooleanTest
typedef struct CoerceToDomain
typedef struct CoerceToDomainValue
typedef struct SetToDefault
typedef struct CurrentOfExpr
typedef struct NextValueExpr
typedef struct InferenceElem
typedef struct TargetEntry
typedef struct RangeTblRef
typedef struct JoinExpr
typedef struct FromExpr
typedef struct OnConflictExpr

转载于:https://my.oschina.net/innovation/blog/3004784

你可能感兴趣的:(数据库,python,数据结构与算法)