aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-06-21 14:39:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-06-21 14:39:04 -0400
commite3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 (patch)
tree8dc7df95c340803546152724fbc17aee4b8527f9 /src/backend/executor
parent8ff6d4ec7840b0af56f1207073f44b7f2afae96d (diff)
downloadpostgresql-e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89.tar.gz
postgresql-e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89.zip
Initial pgindent run with pg_bsd_indent version 2.0.
The new indent version includes numerous fixes thanks to Piotr Stefaniak. The main changes visible in this commit are: * Nicer formatting of function-pointer declarations. * No longer unexpectedly removes spaces in expressions using casts, sizeof, or offsetof. * No longer wants to add a space in "struct structname *varname", as well as some similar cases for const- or volatile-qualified pointers. * Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely. * Fixes bug where comments following declarations were sometimes placed with no space separating them from the code. * Fixes some odd decisions for comments following case labels. * Fixes some cases where comments following code were indented to less than the expected column 33. On the less good side, it now tends to put more whitespace around typedef names that are not listed in typedefs.list. This might encourage us to put more effort into typedef name collection; it's not really a bug in indent itself. There are more changes coming after this round, having to do with comment indentation and alignment of lines appearing within parentheses. I wanted to limit the size of the diffs to something that could be reviewed without one's eyes completely glazing over, so it seemed better to split up the changes as much as practical. 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/backend/executor')
-rw-r--r--src/backend/executor/execCurrent.c2
-rw-r--r--src/backend/executor/functions.c2
-rw-r--r--src/backend/executor/nodeAgg.c10
-rw-r--r--src/backend/executor/nodeHashjoin.c2
-rw-r--r--src/backend/executor/nodeMaterial.c2
-rw-r--r--src/backend/executor/nodeMergejoin.c4
-rw-r--r--src/backend/executor/nodeProjectSet.c2
-rw-r--r--src/backend/executor/nodeSetOp.c4
-rw-r--r--src/backend/executor/nodeWindowAgg.c2
9 files changed, 15 insertions, 15 deletions
diff --git a/src/backend/executor/execCurrent.c b/src/backend/executor/execCurrent.c
index 3af4a90b515..f00fce59132 100644
--- a/src/backend/executor/execCurrent.c
+++ b/src/backend/executor/execCurrent.c
@@ -151,7 +151,7 @@ execCurrentOf(CurrentOfExpr *cexpr,
{
ScanState *scanstate;
bool lisnull;
- Oid tuple_tableoid PG_USED_FOR_ASSERTS_ONLY;
+ Oid tuple_tableoid PG_USED_FOR_ASSERTS_ONLY;
ItemPointer tuple_tid;
/*
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 89aea2fe5c5..f15ff64a3b4 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -140,7 +140,7 @@ typedef struct SQLFunctionParseInfo
char **argnames; /* names of input arguments; NULL if none */
/* Note that argnames[i] can be NULL, if some args are unnamed */
Oid collation; /* function's input collation, if known */
-} SQLFunctionParseInfo;
+} SQLFunctionParseInfo;
/* non-export function prototypes */
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 7eeda95af75..96cdfb7ad2a 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -391,7 +391,7 @@ typedef struct AggStatePerTransData
FunctionCallInfoData serialfn_fcinfo;
FunctionCallInfoData deserialfn_fcinfo;
-} AggStatePerTransData;
+} AggStatePerTransData;
/*
* AggStatePerAggData - per-aggregate information
@@ -439,7 +439,7 @@ typedef struct AggStatePerAggData
int16 resulttypeLen;
bool resulttypeByVal;
-} AggStatePerAggData;
+} AggStatePerAggData;
/*
* AggStatePerGroupData - per-aggregate-per-group working state
@@ -471,7 +471,7 @@ typedef struct AggStatePerGroupData
* NULL and not auto-replace it with a later input value. Only the first
* non-NULL input will be auto-substituted.
*/
-} AggStatePerGroupData;
+} AggStatePerGroupData;
/*
* AggStatePerPhaseData - per-grouping-set-phase state
@@ -493,7 +493,7 @@ typedef struct AggStatePerPhaseData
FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
Agg *aggnode; /* Agg node for phase data */
Sort *sortnode; /* Sort node for input ordering for phase */
-} AggStatePerPhaseData;
+} AggStatePerPhaseData;
/*
* AggStatePerHashData - per-hashtable state
@@ -515,7 +515,7 @@ typedef struct AggStatePerHashData
AttrNumber *hashGrpColIdxInput; /* hash col indices in input slot */
AttrNumber *hashGrpColIdxHash; /* indices in hashtbl tuples */
Agg *aggnode; /* original Agg node, for numGroups etc. */
-} AggStatePerHashData;
+} AggStatePerHashData;
static void select_current_set(AggState *aggstate, int setno, bool is_hash);
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index f9ab0d60353..907090395cc 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -687,7 +687,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
BufFileClose(hashtable->outerBatchFile[curbatch]);
hashtable->outerBatchFile[curbatch] = NULL;
}
- else /* we just finished the first batch */
+ else /* we just finished the first batch */
{
/*
* Reset some of the skew optimization state variables, since we no
diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c
index aa5d2529f4f..32b7269cdaf 100644
--- a/src/backend/executor/nodeMaterial.c
+++ b/src/backend/executor/nodeMaterial.c
@@ -66,7 +66,7 @@ ExecMaterial(MaterialState *node)
* Allocate a second read pointer to serve as the mark. We know it
* must have index 1, so needn't store that.
*/
- int ptrno PG_USED_FOR_ASSERTS_ONLY;
+ int ptrno PG_USED_FOR_ASSERTS_ONLY;
ptrno = tuplestore_alloc_read_pointer(tuplestorestate,
node->eflags);
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index 572e9dce94c..336270f02ac 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -137,7 +137,7 @@ typedef struct MergeJoinClauseData
* stored here.
*/
SortSupportData ssup;
-} MergeJoinClauseData;
+} MergeJoinClauseData;
/* Result type for MJEvalOuterValues and MJEvalInnerValues */
typedef enum
@@ -216,7 +216,7 @@ MJExamineQuals(List *mergeclauses,
clause->ssup.ssup_reverse = false;
else if (opstrategy == BTGreaterStrategyNumber)
clause->ssup.ssup_reverse = true;
- else /* planner screwed up */
+ else /* planner screwed up */
elog(ERROR, "unsupported mergejoin strategy %d", opstrategy);
clause->ssup.ssup_nulls_first = nulls_first;
diff --git a/src/backend/executor/nodeProjectSet.c b/src/backend/executor/nodeProjectSet.c
index 2f0a4e647b9..01048cc8268 100644
--- a/src/backend/executor/nodeProjectSet.c
+++ b/src/backend/executor/nodeProjectSet.c
@@ -120,7 +120,7 @@ ExecProjectSRF(ProjectSetState *node, bool continuing)
{
TupleTableSlot *resultSlot = node->ps.ps_ResultTupleSlot;
ExprContext *econtext = node->ps.ps_ExprContext;
- bool hassrf PG_USED_FOR_ASSERTS_ONLY;
+ bool hassrf PG_USED_FOR_ASSERTS_ONLY;
bool hasresult;
int argno;
diff --git a/src/backend/executor/nodeSetOp.c b/src/backend/executor/nodeSetOp.c
index 9ae53bb8a71..0fb5615da3f 100644
--- a/src/backend/executor/nodeSetOp.c
+++ b/src/backend/executor/nodeSetOp.c
@@ -64,7 +64,7 @@ typedef struct SetOpStatePerGroupData
{
long numLeft; /* number of left-input dups in group */
long numRight; /* number of right-input dups in group */
-} SetOpStatePerGroupData;
+} SetOpStatePerGroupData;
static TupleTableSlot *setop_retrieve_direct(SetOpState *setopstate);
@@ -333,7 +333,7 @@ setop_fill_hash_table(SetOpState *setopstate)
SetOp *node = (SetOp *) setopstate->ps.plan;
PlanState *outerPlan;
int firstFlag;
- bool in_first_rel PG_USED_FOR_ASSERTS_ONLY;
+ bool in_first_rel PG_USED_FOR_ASSERTS_ONLY;
/*
* get state info from node
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 628bc9f00b7..433d97c8b4e 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -95,7 +95,7 @@ typedef struct WindowStatePerFuncData
int aggno; /* if so, index of its PerAggData */
WindowObject winobj; /* object used in window function API */
-} WindowStatePerFuncData;
+} WindowStatePerFuncData;
/*
* For plain aggregate window functions, we also have one of these.