summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:18:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:19:25 -0400
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/include/nodes/execnodes.h
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
downloadpostgresql-c7b8998ebbf310a156aa38022555a24d98fdbfb4.tar.gz
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h86
1 files changed, 39 insertions, 47 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 7cb3fc922c..d535f7a648 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -138,8 +138,8 @@ typedef struct IndexInfo
List *ii_Predicate; /* list of Expr */
ExprState *ii_PredicateState;
Oid *ii_ExclusionOps; /* array with one entry per column */
- Oid *ii_ExclusionProcs; /* array with one entry per column */
- uint16 *ii_ExclusionStrats; /* array with one entry per column */
+ Oid *ii_ExclusionProcs; /* array with one entry per column */
+ uint16 *ii_ExclusionStrats; /* array with one entry per column */
Oid *ii_UniqueOps; /* array with one entry per column */
Oid *ii_UniqueProcs; /* array with one entry per column */
uint16 *ii_UniqueStrats; /* array with one entry per column */
@@ -203,7 +203,7 @@ typedef struct ExprContext
MemoryContext ecxt_per_tuple_memory;
/* Values to substitute for Param nodes in expression */
- ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */
+ ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */
ParamListInfo ecxt_param_list_info; /* for other param types */
/*
@@ -249,7 +249,7 @@ typedef enum
{
SFRM_ValuePerCall = 0x01, /* one value returned per call */
SFRM_Materialize = 0x02, /* result set instantiated in Tuplestore */
- SFRM_Materialize_Random = 0x04, /* Tuplestore needs randomAccess */
+ SFRM_Materialize_Random = 0x04, /* Tuplestore needs randomAccess */
SFRM_Materialize_Preferred = 0x08 /* caller prefers Tuplestore */
} SetFunctionReturnMode;
@@ -419,8 +419,8 @@ typedef struct EState
/* Info about target table(s) for insert/update/delete queries: */
ResultRelInfo *es_result_relations; /* array of ResultRelInfos */
- int es_num_result_relations; /* length of array */
- ResultRelInfo *es_result_relation_info; /* currently active array elt */
+ int es_num_result_relations; /* length of array */
+ ResultRelInfo *es_result_relation_info; /* currently active array elt */
/*
* Info about the target partitioned target table root(s) for
@@ -433,16 +433,16 @@ typedef struct EState
int es_num_root_result_relations; /* length of the array */
/* Stuff used for firing triggers: */
- List *es_trig_target_relations; /* trigger-only ResultRelInfos */
+ List *es_trig_target_relations; /* trigger-only ResultRelInfos */
TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */
- TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */
- TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */
+ TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */
+ TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */
/* Parameter info: */
ParamListInfo es_param_list_info; /* values of external params */
ParamExecData *es_param_exec_vals; /* values of internal params */
- QueryEnvironment *es_queryEnv; /* query environment */
+ QueryEnvironment *es_queryEnv; /* query environment */
/* Other working state: */
MemoryContext es_query_cxt; /* per-query context in which EState lives */
@@ -460,9 +460,9 @@ typedef struct EState
List *es_exprcontexts; /* List of ExprContexts within EState */
- List *es_subplanstates; /* List of PlanState for SubPlans */
+ List *es_subplanstates; /* List of PlanState for SubPlans */
- List *es_auxmodifytables; /* List of secondary ModifyTableStates */
+ List *es_auxmodifytables; /* List of secondary ModifyTableStates */
/*
* this ExprContext is for per-output-tuple operations, such as constraint
@@ -691,8 +691,7 @@ typedef struct SetExprState
* output. If so, it's stored here.
*/
TupleDesc funcResultDesc;
- bool funcReturnsTuple; /* valid when funcResultDesc isn't
- * NULL */
+ bool funcReturnsTuple; /* valid when funcResultDesc isn't NULL */
/*
* Remember whether the function is declared to return a set. This is set
@@ -784,7 +783,7 @@ typedef enum DomainConstraintType
typedef struct DomainConstraintState
{
NodeTag type;
- DomainConstraintType constrainttype; /* constraint type */
+ DomainConstraintType constrainttype; /* constraint type */
char *name; /* name of constraint (for error msgs) */
Expr *check_expr; /* for CHECK, a boolean expression */
ExprState *check_exprstate; /* check_expr's eval state, or NULL */
@@ -907,7 +906,7 @@ typedef struct ProjectSetState
Node **elems; /* array of expression states */
ExprDoneCond *elemdone; /* array of per-SRF is-done states */
int nelems; /* length of elemdone[] array */
- bool pending_srf_tuples; /* still evaluating srfs in tlist? */
+ bool pending_srf_tuples; /* still evaluating srfs in tlist? */
} ProjectSetState;
/* ----------------
@@ -923,26 +922,24 @@ typedef struct ModifyTableState
PlanState **mt_plans; /* subplans (one per target rel) */
int mt_nplans; /* number of plans in the array */
int mt_whichplan; /* which one is being executed (0..n-1) */
- ResultRelInfo *resultRelInfo; /* per-subplan target relations */
+ ResultRelInfo *resultRelInfo; /* per-subplan target relations */
ResultRelInfo *rootResultRelInfo; /* root target relation (partitioned
* table root) */
List **mt_arowmarks; /* per-subplan ExecAuxRowMark lists */
EPQState mt_epqstate; /* for evaluating EvalPlanQual rechecks */
bool fireBSTriggers; /* do we need to fire stmt triggers? */
- OnConflictAction mt_onconflict; /* ON CONFLICT type */
- List *mt_arbiterindexes; /* unique index OIDs to arbitrate
- * taking alt path */
+ OnConflictAction mt_onconflict; /* ON CONFLICT type */
+ List *mt_arbiterindexes; /* unique index OIDs to arbitrate taking
+ * alt path */
TupleTableSlot *mt_existing; /* slot to store existing target tuple in */
- List *mt_excludedtlist; /* the excluded pseudo relation's
- * tlist */
- TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection
- * target */
+ List *mt_excludedtlist; /* the excluded pseudo relation's tlist */
+ TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection target */
struct PartitionDispatchData **mt_partition_dispatch_info;
/* Tuple-routing support info */
int mt_num_dispatch; /* Number of entries in the above array */
- int mt_num_partitions; /* Number of members in the following
- * arrays */
- ResultRelInfo *mt_partitions; /* Per partition result relation */
+ int mt_num_partitions; /* Number of members in the following
+ * arrays */
+ ResultRelInfo *mt_partitions; /* Per partition result relation */
TupleConversionMap **mt_partition_tupconv_maps;
/* Per partition tuple conversion map */
TupleTableSlot *mt_partition_tuple_slot;
@@ -1081,7 +1078,7 @@ typedef struct SampleScanState
List *args; /* expr states for TABLESAMPLE params */
ExprState *repeatable; /* expr state for REPEATABLE expr */
/* use struct pointer to avoid including tsmapi.h here */
- struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */
+ struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */
void *tsm_state; /* tablesample method can keep state here */
bool use_bulkread; /* use bulkread buffer access strategy? */
bool use_pagemode; /* use page-at-a-time visibility checking? */
@@ -1380,8 +1377,7 @@ typedef struct FunctionScanState
bool simple;
int64 ordinal;
int nfuncs;
- struct FunctionScanPerFuncState *funcstates; /* array of length
- * nfuncs */
+ struct FunctionScanPerFuncState *funcstates; /* array of length nfuncs */
MemoryContext argcontext;
} FunctionScanState;
@@ -1428,7 +1424,7 @@ typedef struct TableFuncScanState
List *ns_uris; /* list of states of namespace uri exprs */
Bitmapset *notnulls; /* nullability flag for each output column */
void *opaque; /* table builder private space */
- const struct TableFuncRoutine *routine; /* table builder methods */
+ const struct TableFuncRoutine *routine; /* table builder methods */
FmgrInfo *in_functions; /* input function for each column */
Oid *typioparams; /* typioparam for each column */
int64 ordinal; /* row number to be output next */
@@ -1500,7 +1496,7 @@ typedef struct WorkTableScanState
typedef struct ForeignScanState
{
ScanState ss; /* its first field is NodeTag */
- ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */
+ ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */
Size pscan_len; /* size of parallel coordination information */
/* use struct pointer to avoid including fdwapi.h here */
struct FdwRoutine *fdwroutine;
@@ -1650,9 +1646,9 @@ typedef struct HashJoinState
{
JoinState js; /* its first field is NodeTag */
ExprState *hashclauses;
- List *hj_OuterHashKeys; /* list of ExprState nodes */
- List *hj_InnerHashKeys; /* list of ExprState nodes */
- List *hj_HashOperators; /* list of operator OIDs */
+ List *hj_OuterHashKeys; /* list of ExprState nodes */
+ List *hj_InnerHashKeys; /* list of ExprState nodes */
+ List *hj_HashOperators; /* list of operator OIDs */
HashJoinTable hj_HashTable;
uint32 hj_CurHashValue;
int hj_CurBucketNo;
@@ -1754,14 +1750,13 @@ typedef struct AggState
ExprContext **aggcontexts; /* econtexts for long-lived data (per GS) */
ExprContext *tmpcontext; /* econtext for input expressions */
ExprContext *curaggcontext; /* currently active aggcontext */
- AggStatePerTrans curpertrans; /* currently active trans state */
+ AggStatePerTrans curpertrans; /* currently active trans state */
bool input_done; /* indicates end of input */
bool agg_done; /* indicates completion of Agg scan */
int projected_set; /* The last projected grouping set */
int current_set; /* The current grouping set being evaluated */
Bitmapset *grouped_cols; /* grouped cols in current projection */
- List *all_grouped_cols; /* list of all grouped cols in DESC
- * order */
+ List *all_grouped_cols; /* list of all grouped cols in DESC order */
/* These fields are for grouping set phase data */
int maxsets; /* The max number of sets in any phase */
AggStatePerPhase phases; /* array of all phases */
@@ -1810,15 +1805,14 @@ typedef struct WindowAggState
int64 frameheadpos; /* current frame head position */
int64 frametailpos; /* current frame tail position */
/* use struct pointer to avoid including windowapi.h here */
- struct WindowObjectData *agg_winobj; /* winobj for aggregate
- * fetches */
+ struct WindowObjectData *agg_winobj; /* winobj for aggregate fetches */
int64 aggregatedbase; /* start row for current aggregates */
int64 aggregatedupto; /* rows before this one are aggregated */
int frameOptions; /* frame_clause options, see WindowDef */
ExprState *startOffset; /* expression for starting bound offset */
ExprState *endOffset; /* expression for ending bound offset */
- Datum startOffsetValue; /* result of startOffset evaluation */
+ Datum startOffsetValue; /* result of startOffset evaluation */
Datum endOffsetValue; /* result of endOffset evaluation */
MemoryContext partcontext; /* context for partition-lifespan data */
@@ -1828,9 +1822,8 @@ typedef struct WindowAggState
bool all_first; /* true if the scan is starting */
bool all_done; /* true if the scan is finished */
- bool partition_spooled; /* true if all tuples in current
- * partition have been spooled into
- * tuplestore */
+ bool partition_spooled; /* true if all tuples in current partition
+ * have been spooled into tuplestore */
bool more_partitions; /* true if there's more partitions after
* this one */
bool framehead_valid; /* true if frameheadpos is known up to
@@ -1910,8 +1903,7 @@ typedef struct GatherMergeState
bool need_to_scan_locally;
int gm_nkeys;
SortSupport gm_sortkeys; /* array of length ms_nkeys */
- struct GMReaderTupleBuffer *gm_tuple_buffers; /* tuple buffer per
- * reader */
+ struct GMReaderTupleBuffer *gm_tuple_buffers; /* tuple buffer per reader */
} GatherMergeState;
/* ----------------
@@ -2007,4 +1999,4 @@ typedef struct LimitState
TupleTableSlot *subSlot; /* tuple last obtained from subplan */
} LimitState;
-#endif /* EXECNODES_H */
+#endif /* EXECNODES_H */