Skip to content

Commit fa27dd4

Browse files
committed
Run pgindent with new pg_bsd_indent version 2.1.1.
Thomas Munro fixed a longstanding annoyance in pg_bsd_indent, that it would misformat lines containing IsA() macros on the assumption that the IsA() call should be treated like a cast. This improves some other cases involving field/variable names that match typedefs, too. The only places that get worse are a couple of uses of the OpenSSL macro STACK_OF(); we'll gladly take that trade-off. Discussion: https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql
1 parent e02ad57 commit fa27dd4

File tree

33 files changed

+47
-47
lines changed

33 files changed

+47
-47
lines changed

src/backend/commands/explain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
753753
* further down in the plan tree.
754754
*/
755755
ps = queryDesc->planstate;
756-
if (IsA(ps, GatherState) &&((Gather *) ps->plan)->invisible)
756+
if (IsA(ps, GatherState) && ((Gather *) ps->plan)->invisible)
757757
{
758758
ps = outerPlanState(ps);
759759
es->hide_workers = true;
@@ -2256,7 +2256,7 @@ show_scan_qual(List *qual, const char *qlabel,
22562256
{
22572257
bool useprefix;
22582258

2259-
useprefix = (IsA(planstate->plan, SubqueryScan) ||es->verbose);
2259+
useprefix = (IsA(planstate->plan, SubqueryScan) || es->verbose);
22602260
show_qual(qual, qlabel, planstate, ancestors, useprefix, es);
22612261
}
22622262

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11136,7 +11136,7 @@ ATColumnChangeRequiresRewrite(Node *expr, AttrNumber varattno)
1113611136
for (;;)
1113711137
{
1113811138
/* only one varno, so no need to check that */
11139-
if (IsA(expr, Var) &&((Var *) expr)->varattno == varattno)
11139+
if (IsA(expr, Var) && ((Var *) expr)->varattno == varattno)
1114011140
return false;
1114111141
else if (IsA(expr, RelabelType))
1114211142
expr = (Node *) ((RelabelType *) expr)->arg;

src/backend/commands/typecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,7 @@ AlterDomainDefault(List *names, Node *defaultRaw)
21762176
* DefineDomain.)
21772177
*/
21782178
if (defaultExpr == NULL ||
2179-
(IsA(defaultExpr, Const) &&((Const *) defaultExpr)->constisnull))
2179+
(IsA(defaultExpr, Const) && ((Const *) defaultExpr)->constisnull))
21802180
{
21812181
/* Default is NULL, drop it */
21822182
defaultExpr = NULL;

src/backend/executor/nodeAgg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ find_unaggregated_cols_walker(Node *node, Bitmapset **colnos)
14101410
*colnos = bms_add_member(*colnos, var->varattno);
14111411
return false;
14121412
}
1413-
if (IsA(node, Aggref) ||IsA(node, GroupingFunc))
1413+
if (IsA(node, Aggref) || IsA(node, GroupingFunc))
14141414
{
14151415
/* do not descend into aggregate exprs */
14161416
return false;

src/backend/executor/nodeProjectSet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ ExecInitProjectSet(ProjectSet *node, EState *estate, int eflags)
277277
TargetEntry *te = (TargetEntry *) lfirst(lc);
278278
Expr *expr = te->expr;
279279

280-
if ((IsA(expr, FuncExpr) &&((FuncExpr *) expr)->funcretset) ||
281-
(IsA(expr, OpExpr) &&((OpExpr *) expr)->opretset))
280+
if ((IsA(expr, FuncExpr) && ((FuncExpr *) expr)->funcretset) ||
281+
(IsA(expr, OpExpr) && ((OpExpr *) expr)->opretset))
282282
{
283283
state->elems[off] = (Node *)
284284
ExecInitFunctionResultSet(expr, state->ps.ps_ExprContext,

src/backend/libpq/be-secure-openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int ssl_protocol_version_to_openssl(int v);
8080
int
8181
be_tls_init(bool isServerStart)
8282
{
83-
STACK_OF(X509_NAME) *root_cert_list = NULL;
83+
STACK_OF(X509_NAME) * root_cert_list = NULL;
8484
SSL_CTX *context;
8585
int ssl_ver_min = -1;
8686
int ssl_ver_max = -1;

src/backend/nodes/outfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3682,7 +3682,7 @@ outNode(StringInfo str, const void *obj)
36823682

36833683
if (obj == NULL)
36843684
appendStringInfoString(str, "<>");
3685-
else if (IsA(obj, List) ||IsA(obj, IntList) || IsA(obj, OidList))
3685+
else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList))
36863686
_outList(str, obj);
36873687
else if (IsA(obj, Integer) ||
36883688
IsA(obj, Float) ||

src/backend/optimizer/path/costsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3257,7 +3257,7 @@ final_cost_mergejoin(PlannerInfo *root, MergePath *path,
32573257
* The whole issue is moot if we are working from a unique-ified outer
32583258
* input, or if we know we don't need to mark/restore at all.
32593259
*/
3260-
if (IsA(outer_path, UniquePath) ||path->skip_mark_restore)
3260+
if (IsA(outer_path, UniquePath) || path->skip_mark_restore)
32613261
rescannedtuples = 0;
32623262
else
32633263
{

src/backend/optimizer/plan/setrefs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ set_upper_references(PlannerInfo *root, Plan *plan, int rtoffset)
19601960
static void
19611961
set_param_references(PlannerInfo *root, Plan *plan)
19621962
{
1963-
Assert(IsA(plan, Gather) ||IsA(plan, GatherMerge));
1963+
Assert(IsA(plan, Gather) || IsA(plan, GatherMerge));
19641964

19651965
if (plan->lefttree->extParam)
19661966
{

src/backend/optimizer/util/pathnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ apply_projection_to_path(PlannerInfo *root,
26392639
* workers can help project. But if there is something that is not
26402640
* parallel-safe in the target expressions, then we can't.
26412641
*/
2642-
if ((IsA(path, GatherPath) ||IsA(path, GatherMergePath)) &&
2642+
if ((IsA(path, GatherPath) || IsA(path, GatherMergePath)) &&
26432643
is_parallel_safe(root, (Node *) target->exprs))
26442644
{
26452645
/*

0 commit comments

Comments
 (0)