PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
relation.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 relation.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  EquivalenceClass
 
struct  EquivalenceMember
 
struct  PathKey
 
struct  PathTarget
 
struct  ParamPathInfo
 
struct  Path
 
struct  IndexPath
 
struct  BitmapHeapPath
 
struct  BitmapAndPath
 
struct  BitmapOrPath
 
struct  TidPath
 
struct  SubqueryScanPath
 
struct  ForeignPath
 
struct  CustomPath
 
struct  AppendPath
 
struct  MergeAppendPath
 
struct  ResultPath
 
struct  MaterialPath
 
struct  UniquePath
 
struct  GatherPath
 
struct  GatherMergePath
 
struct  JoinPath
 
struct  MergePath
 
struct  HashPath
 
struct  ProjectionPath
 
struct  ProjectSetPath
 
struct  SortPath
 
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  AppendRelInfo
 
struct  PartitionedChildRelInfo
 
struct  PlaceHolderInfo
 
struct  MinMaxAggInfo
 
struct  PlannerParamItem
 
struct  SemiAntiJoinFactors
 
struct  JoinPathExtraData
 
struct  JoinCostWorkspace
 

Macros

#define planner_subplan_get_plan(root, subplan)   ((Plan *) list_nth((root)->glob->subplans, (subplan)->plan_id - 1))
 
#define planner_rt_fetch(rti, root)
 
#define IS_SIMPLE_REL(rel)
 
#define IS_JOIN_REL(rel)
 
#define IS_UPPER_REL(rel)   ((rel)->reloptkind == RELOPT_UPPER_REL)
 
#define IS_OTHER_REL(rel)
 
#define IS_PARTITIONED_REL(rel)   ((rel)->part_scheme && (rel)->boundinfo && (rel)->nparts > 0)
 
#define REL_HAS_ALL_PART_PROPS(rel)
 
#define EC_MUST_BE_REDUNDANT(eclass)   ((eclass)->ec_has_const && !(eclass)->ec_below_outer_join)
 
#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_PATH(p)   (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL)
 
#define IS_DUMMY_REL(r)
 

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
PartitionSchemeData
PartitionScheme
 
typedef enum RelOptKind RelOptKind
 
typedef struct RelOptInfo RelOptInfo
 
typedef struct IndexOptInfo IndexOptInfo
 
typedef struct ForeignKeyOptInfo ForeignKeyOptInfo
 
typedef struct StatisticExtInfo StatisticExtInfo
 
typedef struct EquivalenceClass EquivalenceClass
 
typedef struct EquivalenceMember EquivalenceMember
 
typedef struct PathKey PathKey
 
typedef struct PathTarget PathTarget
 
typedef struct ParamPathInfo ParamPathInfo
 
typedef struct Path Path
 
typedef struct IndexPath IndexPath
 
typedef struct BitmapHeapPath BitmapHeapPath
 
typedef struct BitmapAndPath BitmapAndPath
 
typedef struct BitmapOrPath BitmapOrPath
 
typedef struct TidPath TidPath
 
typedef struct SubqueryScanPath SubqueryScanPath
 
typedef struct ForeignPath ForeignPath
 
typedef struct CustomPath CustomPath
 
typedef struct AppendPath AppendPath
 
typedef struct MergeAppendPath MergeAppendPath
 
typedef struct ResultPath ResultPath
 
typedef struct MaterialPath MaterialPath
 
typedef struct UniquePath UniquePath
 
typedef struct GatherPath GatherPath
 
typedef struct GatherMergePath GatherMergePath
 
typedef struct JoinPath JoinPath
 
typedef JoinPath NestPath
 
typedef struct MergePath MergePath
 
typedef struct HashPath HashPath
 
typedef struct ProjectionPath ProjectionPath
 
typedef struct ProjectSetPath ProjectSetPath
 
typedef struct SortPath SortPath
 
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 AppendRelInfo AppendRelInfo
 
typedef struct
PartitionedChildRelInfo 
PartitionedChildRelInfo
 
typedef struct PlaceHolderInfo PlaceHolderInfo
 
typedef struct MinMaxAggInfo MinMaxAggInfo
 
typedef struct PlannerParamItem PlannerParamItem
 
typedef struct SemiAntiJoinFactors SemiAntiJoinFactors
 
typedef struct JoinPathExtraData JoinPathExtraData
 
typedef struct JoinCostWorkspace JoinCostWorkspace
 

Enumerations

enum  CostSelector { STARTUP_COST, TOTAL_COST }
 
enum  UpperRelationKind {
  UPPERREL_SETOP, UPPERREL_GROUP_AGG, UPPERREL_WINDOW, UPPERREL_DISTINCT,
  UPPERREL_ORDERED, UPPERREL_FINAL
}
 
enum  RelOptKind {
  RELOPT_BASEREL, RELOPT_JOINREL, RELOPT_OTHER_MEMBER_REL, RELOPT_OTHER_JOINREL,
  RELOPT_UPPER_REL, RELOPT_DEADREL
}
 
enum  UniquePathMethod { UNIQUE_PATH_NOOP, UNIQUE_PATH_HASH, UNIQUE_PATH_SORT }
 

Macro Definition Documentation

#define EC_MUST_BE_REDUNDANT (   eclass)    ((eclass)->ec_has_const && !(eclass)->ec_below_outer_join)

Definition at line 881 of file relation.h.

Referenced by pathkey_is_redundant(), and select_mergejoin_clauses().

#define get_pathtarget_sortgroupref (   target,
  colno 
)    ((target)->sortgrouprefs ? (target)->sortgrouprefs[colno] : (Index) 0)
#define IS_DUMMY_PATH (   p)    (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL)

Definition at line 1271 of file relation.h.

Referenced by inheritance_planner(), and is_projection_capable_path().

#define IS_DUMMY_REL (   r)
#define IS_PARTITIONED_REL (   rel)    ((rel)->part_scheme && (rel)->boundinfo && (rel)->nparts > 0)

Definition at line 674 of file relation.h.

Referenced by build_joinrel_partition_info(), and try_partition_wise_join().

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

Definition at line 137 of file relation.h.

Referenced by finalize_plan(), and finalize_primnode().

#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 681 of file relation.h.

Referenced by build_joinrel_partition_info(), and try_partition_wise_join().

Typedef Documentation

Definition at line 1400 of file relation.h.

Definition at line 359 of file relation.h.

typedef struct Path Path

Definition at line 28 of file relation.h.

Enumeration Type Documentation

Enumerator
STARTUP_COST 
TOTAL_COST 

Definition at line 34 of file relation.h.

35 {
37 } CostSelector;
CostSelector
Definition: relation.h:34
enum RelOptKind
Enumerator
RELOPT_BASEREL 
RELOPT_JOINREL 
RELOPT_OTHER_MEMBER_REL 
RELOPT_OTHER_JOINREL 
RELOPT_UPPER_REL 
RELOPT_DEADREL 

Definition at line 547 of file relation.h.

Enumerator
UNIQUE_PATH_NOOP 
UNIQUE_PATH_HASH 
UNIQUE_PATH_SORT 

Definition at line 1329 of file relation.h.

1330 {
1331  UNIQUE_PATH_NOOP, /* input is known unique already */
1332  UNIQUE_PATH_HASH, /* use hashing */
1333  UNIQUE_PATH_SORT /* use sorting */
UniquePathMethod
Definition: relation.h:1329
Enumerator
UPPERREL_SETOP 
UPPERREL_GROUP_AGG 
UPPERREL_WINDOW 
UPPERREL_DISTINCT 
UPPERREL_ORDERED 
UPPERREL_FINAL 

Definition at line 71 of file relation.h.

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