summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/execnodes.h4
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/parsenodes.h72
-rw-r--r--src/include/nodes/pathnodes.h46
-rw-r--r--src/include/nodes/plannodes.h6
-rw-r--r--src/include/nodes/primnodes.h43
6 files changed, 90 insertions, 84 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 94b191f8ae..5728801379 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -2158,8 +2158,8 @@ typedef struct MemoizeState
* by bit, false when using hash equality ops */
MemoizeInstrumentation stats; /* execution statistics */
SharedMemoizeInfo *shared_info; /* statistics for parallel workers */
- Bitmapset *keyparamids; /* Param->paramids of expressions belonging to
- * param_exprs */
+ Bitmapset *keyparamids; /* Param->paramids of expressions belonging to
+ * param_exprs */
} MemoizeState;
/* ----------------
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 340d28f4e1..b3b407579b 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -705,7 +705,8 @@ extern bool equal(const void *a, const void *b);
*/
typedef double Selectivity; /* fraction of tuples a qualifier will pass */
typedef double Cost; /* execution cost (in page-access units) */
-typedef double Cardinality; /* (estimated) number of rows or other integer count */
+typedef double Cardinality; /* (estimated) number of rows or other integer
+ * count */
/*
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 9a716f3794..73f635b455 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -301,6 +301,7 @@ typedef struct A_Expr
typedef struct A_Const
{
NodeTag type;
+
/*
* Value nodes are inline for performance. You can treat 'val' as a node,
* as in IsA(&val, Integer). 'val' is not valid if isnull is true.
@@ -763,7 +764,8 @@ typedef struct DefElem
NodeTag type;
char *defnamespace; /* NULL if unqualified name */
char *defname;
- Node *arg; /* typically Integer, Float, String, or TypeName */
+ Node *arg; /* typically Integer, Float, String, or
+ * TypeName */
DefElemAction defaction; /* unspecified action, or SET/ADD/DROP */
int location; /* token location, or -1 if unknown */
} DefElem;
@@ -1151,7 +1153,7 @@ typedef struct RangeTblEntry
* Fields valid for ENR RTEs (else NULL/zero):
*/
char *enrname; /* name of ephemeral named relation */
- Cardinality enrtuples; /* estimated or actual from caller */
+ Cardinality enrtuples; /* estimated or actual from caller */
/*
* Fields valid in all RTEs:
@@ -1667,7 +1669,7 @@ typedef struct JsonFuncExpr
JsonOutput *output; /* output clause, if specified */
JsonBehavior *on_empty; /* ON EMPTY behavior, if specified */
JsonBehavior *on_error; /* ON ERROR behavior, if specified */
- JsonWrapper wrapper; /* array wrapper behavior (JSON_QUERY only) */
+ JsonWrapper wrapper; /* array wrapper behavior (JSON_QUERY only) */
bool omit_quotes; /* omit or keep quotes? (JSON_QUERY only) */
int location; /* token location, or -1 if unknown */
} JsonFuncExpr;
@@ -1680,17 +1682,17 @@ typedef struct JsonTableColumn
{
NodeTag type;
JsonTableColumnType coltype; /* column type */
- char *name; /* column name */
- TypeName *typeName; /* column type name */
- char *pathspec; /* path specification, if any */
- char *pathname; /* path name, if any */
- JsonFormat *format; /* JSON format clause, if specified */
- JsonWrapper wrapper; /* WRAPPER behavior for formatted columns */
- bool omit_quotes; /* omit or keep quotes on scalar strings? */
- List *columns; /* nested columns */
- JsonBehavior *on_empty; /* ON EMPTY behavior */
- JsonBehavior *on_error; /* ON ERROR behavior */
- int location; /* token location, or -1 if unknown */
+ char *name; /* column name */
+ TypeName *typeName; /* column type name */
+ char *pathspec; /* path specification, if any */
+ char *pathname; /* path name, if any */
+ JsonFormat *format; /* JSON format clause, if specified */
+ JsonWrapper wrapper; /* WRAPPER behavior for formatted columns */
+ bool omit_quotes; /* omit or keep quotes on scalar strings? */
+ List *columns; /* nested columns */
+ JsonBehavior *on_empty; /* ON EMPTY behavior */
+ JsonBehavior *on_error; /* ON ERROR behavior */
+ int location; /* token location, or -1 if unknown */
} JsonTableColumn;
/*
@@ -1725,12 +1727,12 @@ typedef struct JsonTablePlan JsonTablePlan;
struct JsonTablePlan
{
NodeTag type;
- JsonTablePlanType plan_type; /* plan type */
+ JsonTablePlanType plan_type; /* plan type */
JsonTablePlanJoinType join_type; /* join type (for joined plan only) */
- JsonTablePlan *plan1; /* first joined plan */
- JsonTablePlan *plan2; /* second joined plan */
- char *pathname; /* path name (for simple plan only) */
- int location; /* token location, or -1 if unknown */
+ JsonTablePlan *plan1; /* first joined plan */
+ JsonTablePlan *plan2; /* second joined plan */
+ char *pathname; /* path name (for simple plan only) */
+ int location; /* token location, or -1 if unknown */
};
/*
@@ -1740,13 +1742,13 @@ struct JsonTablePlan
typedef struct JsonTable
{
NodeTag type;
- JsonCommon *common; /* common JSON path syntax fields */
- List *columns; /* list of JsonTableColumn */
- JsonTablePlan *plan; /* join plan, if specified */
- JsonBehavior *on_error; /* ON ERROR behavior, if specified */
- Alias *alias; /* table alias in FROM clause */
- bool lateral; /* does it have LATERAL prefix? */
- int location; /* token location, or -1 if unknown */
+ JsonCommon *common; /* common JSON path syntax fields */
+ List *columns; /* list of JsonTableColumn */
+ JsonTablePlan *plan; /* join plan, if specified */
+ JsonBehavior *on_error; /* ON ERROR behavior, if specified */
+ Alias *alias; /* table alias in FROM clause */
+ bool lateral; /* does it have LATERAL prefix? */
+ int location; /* token location, or -1 if unknown */
} JsonTable;
/*
@@ -1807,7 +1809,7 @@ typedef struct JsonObjectConstructor
NodeTag type;
List *exprs; /* list of JsonKeyValue pairs */
JsonOutput *output; /* RETURNING clause, if specified */
- bool absent_on_null; /* skip NULL values? */
+ bool absent_on_null; /* skip NULL values? */
bool unique; /* check key uniqueness? */
int location; /* token location, or -1 if unknown */
} JsonObjectConstructor;
@@ -1821,7 +1823,7 @@ typedef struct JsonArrayConstructor
NodeTag type;
List *exprs; /* list of JsonValueExpr elements */
JsonOutput *output; /* RETURNING clause, if specified */
- bool absent_on_null; /* skip NULL elements? */
+ bool absent_on_null; /* skip NULL elements? */
int location; /* token location, or -1 if unknown */
} JsonArrayConstructor;
@@ -1835,7 +1837,7 @@ typedef struct JsonArrayQueryConstructor
Node *query; /* subquery */
JsonOutput *output; /* RETURNING clause, if specified */
JsonFormat *format; /* FORMAT clause for subquery, if specified */
- bool absent_on_null; /* skip NULL elements? */
+ bool absent_on_null; /* skip NULL elements? */
int location; /* token location, or -1 if unknown */
} JsonArrayQueryConstructor;
@@ -1861,9 +1863,9 @@ typedef struct JsonAggConstructor
typedef struct JsonObjectAgg
{
NodeTag type;
- JsonAggConstructor *constructor; /* common fields */
+ JsonAggConstructor *constructor; /* common fields */
JsonKeyValue *arg; /* object key-value pair */
- bool absent_on_null; /* skip NULL values? */
+ bool absent_on_null; /* skip NULL values? */
bool unique; /* check key uniqueness? */
} JsonObjectAgg;
@@ -1874,9 +1876,9 @@ typedef struct JsonObjectAgg
typedef struct JsonArrayAgg
{
NodeTag type;
- JsonAggConstructor *constructor; /* common fields */
+ JsonAggConstructor *constructor; /* common fields */
JsonValueExpr *arg; /* array element expression */
- bool absent_on_null; /* skip NULL elements? */
+ bool absent_on_null; /* skip NULL elements? */
} JsonArrayAgg;
@@ -2621,7 +2623,7 @@ typedef struct Constraint
char generated_when; /* ALWAYS or BY DEFAULT */
/* Fields used for unique constraints (UNIQUE and PRIMARY KEY): */
- bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
+ bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
List *keys; /* String nodes naming referenced key
* column(s) */
List *including; /* String nodes naming referenced nonkey
@@ -3250,7 +3252,7 @@ typedef struct IndexStmt
SubTransactionId oldFirstRelfilenodeSubid; /* rd_firstRelfilenodeSubid of
* oldNode */
bool unique; /* is index unique? */
- bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
+ bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
bool primary; /* is index a primary key? */
bool isconstraint; /* is it for a pkey/unique constraint? */
bool deferrable; /* is the constraint DEFERRABLE? */
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index 244d1e1197..a6e5db4eec 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -335,11 +335,11 @@ struct PlannerInfo
MemoryContext planner_cxt; /* context holding PlannerInfo */
- Cardinality total_table_pages; /* # of pages in all non-dummy tables of
+ Cardinality total_table_pages; /* # of pages in all non-dummy tables of
* query */
- Selectivity tuple_fraction; /* tuple_fraction passed to query_planner */
- Cardinality limit_tuples; /* limit_tuples passed to query_planner */
+ Selectivity tuple_fraction; /* tuple_fraction passed to query_planner */
+ Cardinality limit_tuples; /* limit_tuples passed to query_planner */
Index qual_security_level; /* minimum security_level for quals */
/* Note: qual_security_level is zero if there are no securityQuals */
@@ -682,7 +682,7 @@ typedef struct RelOptInfo
Relids relids; /* set of base relids (rangetable indexes) */
/* size estimates generated by planner */
- Cardinality rows; /* estimated number of result tuples */
+ Cardinality rows; /* estimated number of result tuples */
/* per-relation planner control flags */
bool consider_startup; /* keep cheap-startup-cost paths? */
@@ -719,7 +719,7 @@ typedef struct RelOptInfo
List *indexlist; /* list of IndexOptInfo */
List *statlist; /* list of StatisticExtInfo */
BlockNumber pages; /* size estimates derived from pg_class */
- Cardinality tuples;
+ Cardinality tuples;
double allvisfrac;
Bitmapset *eclass_indexes; /* Indexes in PlannerInfo's eq_classes list of
* ECs that mention this rel */
@@ -842,7 +842,7 @@ struct IndexOptInfo
/* index-size statistics (from pg_class and elsewhere) */
BlockNumber pages; /* number of disk pages in index */
- Cardinality tuples; /* number of index tuples in index */
+ Cardinality tuples; /* number of index tuples in index */
int tree_height; /* index tree height, or -1 if unknown */
/* index descriptor information */
@@ -1151,7 +1151,7 @@ typedef struct ParamPathInfo
NodeTag type;
Relids ppi_req_outer; /* rels supplying parameters used by path */
- Cardinality ppi_rows; /* estimated number of result tuples */
+ Cardinality ppi_rows; /* estimated number of result tuples */
List *ppi_clauses; /* join clauses available from outer rels */
} ParamPathInfo;
@@ -1201,7 +1201,7 @@ typedef struct Path
int parallel_workers; /* desired # of workers; 0 = not parallel */
/* estimated size/costs for path (see costsize.c for more info) */
- Cardinality rows; /* estimated number of result tuples */
+ Cardinality rows; /* estimated number of result tuples */
Cost startup_cost; /* cost expended before fetching any tuples */
Cost total_cost; /* total cost (assuming all tuples fetched) */
@@ -1464,7 +1464,7 @@ typedef struct AppendPath
List *subpaths; /* list of component Paths */
/* Index of first partial path in subpaths; list_length(subpaths) if none */
int first_partial_path;
- Cardinality limit_tuples; /* hard limit on output tuples, or -1 */
+ Cardinality limit_tuples; /* hard limit on output tuples, or -1 */
} AppendPath;
#define IS_DUMMY_APPEND(p) \
@@ -1486,7 +1486,7 @@ typedef struct MergeAppendPath
{
Path path;
List *subpaths; /* list of component Paths */
- Cardinality limit_tuples; /* hard limit on output tuples, or -1 */
+ Cardinality limit_tuples; /* hard limit on output tuples, or -1 */
} MergeAppendPath;
/*
@@ -1529,7 +1529,7 @@ typedef struct MemoizePath
* complete after caching the first record. */
bool binary_mode; /* true when cache key should be compared bit
* by bit, false when using hash equality ops */
- Cardinality calls; /* expected number of rescans */
+ Cardinality calls; /* expected number of rescans */
uint32 est_entries; /* The maximum number of entries that the
* planner expects will fit in the cache, or 0
* if unknown */
@@ -1681,7 +1681,7 @@ typedef struct HashPath
JoinPath jpath;
List *path_hashclauses; /* join clauses used for hashing */
int num_batches; /* number of batches expected */
- Cardinality inner_rows_total; /* total inner rows expected */
+ Cardinality inner_rows_total; /* total inner rows expected */
} HashPath;
/*
@@ -1784,7 +1784,7 @@ typedef struct AggPath
Path *subpath; /* path representing input source */
AggStrategy aggstrategy; /* basic strategy, see nodes.h */
AggSplit aggsplit; /* agg-splitting mode, see nodes.h */
- Cardinality numGroups; /* estimated number of groups in input */
+ Cardinality numGroups; /* estimated number of groups in input */
uint64 transitionSpace; /* for pass-by-ref transition data */
List *groupClause; /* a list of SortGroupClause's */
List *qual; /* quals (HAVING quals), if any */
@@ -1798,7 +1798,7 @@ typedef struct GroupingSetData
{
NodeTag type;
List *set; /* grouping set as list of sortgrouprefs */
- Cardinality numGroups; /* est. number of result groups */
+ Cardinality numGroups; /* est. number of result groups */
} GroupingSetData;
typedef struct RollupData
@@ -1807,7 +1807,7 @@ typedef struct RollupData
List *groupClause; /* applicable subset of parse->groupClause */
List *gsets; /* lists of integer indexes into groupClause */
List *gsets_data; /* list of GroupingSetData */
- Cardinality numGroups; /* est. number of result groups */
+ Cardinality numGroups; /* est. number of result groups */
bool hashable; /* can be hashed */
bool is_hashed; /* to be implemented as a hashagg */
} RollupData;
@@ -1861,7 +1861,7 @@ typedef struct SetOpPath
List *distinctList; /* SortGroupClauses identifying target cols */
AttrNumber flagColIdx; /* where is the flag column, if any */
int firstFlag; /* flag value for first input relation */
- Cardinality numGroups; /* estimated number of groups in input */
+ Cardinality numGroups; /* estimated number of groups in input */
} SetOpPath;
/*
@@ -1874,7 +1874,7 @@ typedef struct RecursiveUnionPath
Path *rightpath;
List *distinctList; /* SortGroupClauses identifying target cols */
int wtParam; /* ID of Param representing work table */
- Cardinality numGroups; /* estimated number of groups in input */
+ Cardinality numGroups; /* estimated number of groups in input */
} RecursiveUnionPath;
/*
@@ -2632,7 +2632,7 @@ typedef struct
typedef struct
{
bool limit_needed;
- Cardinality limit_tuples;
+ Cardinality limit_tuples;
int64 count_est;
int64 offset_est;
} FinalPathExtraData;
@@ -2663,15 +2663,15 @@ typedef struct JoinCostWorkspace
Cost inner_rescan_run_cost;
/* private for cost_mergejoin code */
- Cardinality outer_rows;
- Cardinality inner_rows;
- Cardinality outer_skip_rows;
- Cardinality inner_skip_rows;
+ Cardinality outer_rows;
+ Cardinality inner_rows;
+ Cardinality outer_skip_rows;
+ Cardinality inner_skip_rows;
/* private for cost_hashjoin code */
int numbuckets;
int numbatches;
- Cardinality inner_rows_total;
+ Cardinality inner_rows_total;
} JoinCostWorkspace;
/*
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index e43e360d9b..e319e83bd8 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -121,7 +121,7 @@ typedef struct Plan
/*
* planner's estimate of result size of this plan step
*/
- Cardinality plan_rows; /* number of rows plan is expected to emit */
+ Cardinality plan_rows; /* number of rows plan is expected to emit */
int plan_width; /* average row width in bytes */
/*
@@ -834,7 +834,7 @@ typedef struct Memoize
uint32 est_entries; /* The maximum number of entries that the
* planner expects will fit in the cache, or 0
* if unknown */
- Bitmapset *keyparamids; /* paramids from param_exprs */
+ Bitmapset *keyparamids; /* paramids from param_exprs */
} Memoize;
/* ----------------
@@ -1013,7 +1013,7 @@ typedef struct Hash
AttrNumber skewColumn; /* outer join key's column #, or zero */
bool skewInherit; /* is outer join rel an inheritance tree? */
/* all other info is in the parent HashJoin node */
- Cardinality rows_total; /* estimate total rows if parallel_aware */
+ Cardinality rows_total; /* estimate total rows if parallel_aware */
} Hash;
/* ----------------
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 66d32fc006..66e179c435 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -1251,7 +1251,7 @@ typedef enum JsonExprOp
JSON_VALUE_OP, /* JSON_VALUE() */
JSON_QUERY_OP, /* JSON_QUERY() */
JSON_EXISTS_OP, /* JSON_EXISTS() */
- JSON_TABLE_OP /* JSON_TABLE() */
+ JSON_TABLE_OP /* JSON_TABLE() */
} JsonExprOp;
/*
@@ -1274,7 +1274,8 @@ typedef enum JsonFormatType
{
JS_FORMAT_DEFAULT, /* unspecified */
JS_FORMAT_JSON, /* FORMAT JSON [ENCODING ...] */
- JS_FORMAT_JSONB /* implicit internal format for RETURNING jsonb */
+ JS_FORMAT_JSONB /* implicit internal format for RETURNING
+ * jsonb */
} JsonFormatType;
/*
@@ -1315,7 +1316,7 @@ typedef enum JsonWrapper
typedef struct JsonFormat
{
NodeTag type;
- JsonFormatType format_type; /* format type */
+ JsonFormatType format_type; /* format type */
JsonEncoding encoding; /* JSON encoding */
int location; /* token location, or -1 if unknown */
} JsonFormat;
@@ -1340,7 +1341,7 @@ typedef struct JsonValueExpr
{
NodeTag type;
Expr *raw_expr; /* raw expression */
- Expr *formatted_expr; /* formatted expression or NULL */
+ Expr *formatted_expr; /* formatted expression or NULL */
JsonFormat *format; /* FORMAT clause, if specified */
} JsonValueExpr;
@@ -1367,7 +1368,7 @@ typedef struct JsonConstructorExpr
Expr *func; /* underlying json[b]_xxx() function call */
Expr *coercion; /* coercion to RETURNING type */
JsonReturning *returning; /* RETURNING clause */
- bool absent_on_null; /* ABSENT ON NULL? */
+ bool absent_on_null; /* ABSENT ON NULL? */
bool unique; /* WITH UNIQUE KEYS? (JSON_OBJECT[AGG] only) */
int location;
} JsonConstructorExpr;
@@ -1380,7 +1381,7 @@ typedef enum JsonValueType
{
JS_TYPE_ANY, /* IS JSON [VALUE] */
JS_TYPE_OBJECT, /* IS JSON OBJECT */
- JS_TYPE_ARRAY, /* IS JSON ARRAY*/
+ JS_TYPE_ARRAY, /* IS JSON ARRAY */
JS_TYPE_SCALAR /* IS JSON SCALAR */
} JsonValueType;
@@ -1450,17 +1451,17 @@ typedef struct JsonExpr
{
Expr xpr;
JsonExprOp op; /* json function ID */
- Node *formatted_expr; /* formatted context item expression */
+ Node *formatted_expr; /* formatted context item expression */
JsonCoercion *result_coercion; /* resulting coercion to RETURNING type */
JsonFormat *format; /* context item format (JSON/JSONB) */
Node *path_spec; /* JSON path specification expression */
List *passing_names; /* PASSING argument names */
- List *passing_values; /* PASSING argument values */
+ List *passing_values; /* PASSING argument values */
JsonReturning *returning; /* RETURNING clause type/format info */
JsonBehavior *on_empty; /* ON EMPTY behavior */
JsonBehavior *on_error; /* ON ERROR behavior */
- JsonItemCoercions *coercions; /* coercions for JSON_VALUE */
- JsonWrapper wrapper; /* WRAPPER for JSON_QUERY */
+ JsonItemCoercions *coercions; /* coercions for JSON_VALUE */
+ JsonWrapper wrapper; /* WRAPPER for JSON_QUERY */
bool omit_quotes; /* KEEP/OMIT QUOTES for JSON_QUERY */
int location; /* token location, or -1 if unknown */
} JsonExpr;
@@ -1472,13 +1473,15 @@ typedef struct JsonExpr
typedef struct JsonTableParent
{
NodeTag type;
- Const *path; /* jsonpath constant */
- char *name; /* path name */
- Node *child; /* nested columns, if any */
- bool outerJoin; /* outer or inner join for nested columns? */
- int colMin; /* min column index in the resulting column list */
- int colMax; /* max column index in the resulting column list */
- bool errorOnError; /* ERROR/EMPTY ON ERROR behavior */
+ Const *path; /* jsonpath constant */
+ char *name; /* path name */
+ Node *child; /* nested columns, if any */
+ bool outerJoin; /* outer or inner join for nested columns? */
+ int colMin; /* min column index in the resulting column
+ * list */
+ int colMax; /* max column index in the resulting column
+ * list */
+ bool errorOnError; /* ERROR/EMPTY ON ERROR behavior */
} JsonTableParent;
/*
@@ -1488,9 +1491,9 @@ typedef struct JsonTableParent
typedef struct JsonTableSibling
{
NodeTag type;
- Node *larg; /* left join node */
- Node *rarg; /* right join node */
- bool cross; /* cross or union join? */
+ Node *larg; /* left join node */
+ Node *rarg; /* right join node */
+ bool cross; /* cross or union join? */
} JsonTableSibling;
/* ----------------