From: Robert Haas Date: Wed, 29 Nov 2017 14:24:24 +0000 (-0500) Subject: Update typedefs.list and re-run pgindent X-Git-Tag: REL_11_BETA1~1144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaedf0df7197b21182f6c341a44e4fdaa3cd6ea6;p=postgresql Update typedefs.list and re-run pgindent Discussion: http://postgr.es/m/CA+TgmoaA9=1RWKtBWpDaj+sF3Stgc8sHgf5z=KGtbjwPLQVDMA@mail.gmail.com --- diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.c b/contrib/fuzzystrmatch/fuzzystrmatch.c index f6341c84cf..b108353c06 100644 --- a/contrib/fuzzystrmatch/fuzzystrmatch.c +++ b/contrib/fuzzystrmatch/fuzzystrmatch.c @@ -104,7 +104,7 @@ soundex_code(char letter) #define TH '0' static char Lookahead(char *word, int how_far); -static void _metaphone(char *word, int max_phonemes, char **phoned_word); +static void _metaphone(char *word, int max_phonemes, char **phoned_word); /* Metachar.h ... little bits about characters for metaphone */ diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index 0148f9549f..a33a86444b 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -925,7 +925,7 @@ eantoobig: * Exported routines. *---------------------------------------------------------*/ -void _PG_init(void); +void _PG_init(void); void _PG_init(void) diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index cafc8fe7be..9fbb093b3c 100644 --- a/src/backend/access/brin/brin.c +++ b/src/backend/access/brin/brin.c @@ -1314,8 +1314,8 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange, /* * Unless requested to summarize even a partial range, go away now if - * we think the next range is partial. Caller would pass true when - * it is typically run once bulk data loading is done + * we think the next range is partial. Caller would pass true when it + * is typically run once bulk data loading is done * (brin_summarize_new_values), and false when it is typically the * result of arbitrarily-scheduled maintenance command (vacuuming). */ diff --git a/src/backend/access/common/printsimple.c b/src/backend/access/common/printsimple.c index 872de7c3f4..f3e48b7e98 100644 --- a/src/backend/access/common/printsimple.c +++ b/src/backend/access/common/printsimple.c @@ -41,12 +41,12 @@ printsimple_startup(DestReceiver *self, int operation, TupleDesc tupdesc) Form_pg_attribute attr = TupleDescAttr(tupdesc, i); pq_sendstring(&buf, NameStr(attr->attname)); - pq_sendint32(&buf, 0); /* table oid */ - pq_sendint16(&buf, 0); /* attnum */ + pq_sendint32(&buf, 0); /* table oid */ + pq_sendint16(&buf, 0); /* attnum */ pq_sendint32(&buf, (int) attr->atttypid); pq_sendint16(&buf, attr->attlen); pq_sendint32(&buf, attr->atttypmod); - pq_sendint16(&buf, 0); /* format code */ + pq_sendint16(&buf, 0); /* format code */ } pq_endmessage(&buf); diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index e729180f82..fba201f659 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6586,10 +6586,10 @@ StartupXLOG(void) else { /* - * We used to attempt to go back to a secondary checkpoint - * record here, but only when not in standby_mode. We now - * just fail if we can't read the last checkpoint because - * this allows us to simplify processing around checkpoints. + * We used to attempt to go back to a secondary checkpoint record + * here, but only when not in standby_mode. We now just fail if we + * can't read the last checkpoint because this allows us to + * simplify processing around checkpoints. */ ereport(PANIC, (errmsg("could not locate a valid checkpoint record"))); @@ -8888,7 +8888,8 @@ CreateCheckPoint(int flags) (errmsg("concurrent write-ahead log activity while database system is shutting down"))); /* - * Remember the prior checkpoint's redo ptr for UpdateCheckPointDistanceEstimate() + * Remember the prior checkpoint's redo ptr for + * UpdateCheckPointDistanceEstimate() */ PriorRedoPtr = ControlFile->checkPointCopy.redo; @@ -9211,7 +9212,8 @@ CreateRestartPoint(int flags) CheckPointGuts(lastCheckPoint.redo, flags); /* - * Remember the prior checkpoint's redo ptr for UpdateCheckPointDistanceEstimate() + * Remember the prior checkpoint's redo ptr for + * UpdateCheckPointDistanceEstimate() */ PriorRedoPtr = ControlFile->checkPointCopy.redo; diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c index 3af6e19c98..cc14063daf 100644 --- a/src/backend/access/transam/xlogutils.c +++ b/src/backend/access/transam/xlogutils.c @@ -802,7 +802,7 @@ void XLogReadDetermineTimeline(XLogReaderState *state, XLogRecPtr wantPage, uint32 wantLength) { const XLogRecPtr lastReadPage = state->readSegNo * - state->wal_segment_size + state->readOff; + state->wal_segment_size + state->readOff; Assert(wantPage != InvalidXLogRecPtr && wantPage % XLOG_BLCKSZ == 0); Assert(wantLength <= XLOG_BLCKSZ); diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index d62230554e..2bf8117757 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -2134,7 +2134,7 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec, if (or_expr_args != NIL) { - Expr *other_parts_constr; + Expr *other_parts_constr; /* * Combine the constraints obtained for non-default partitions @@ -2143,20 +2143,20 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec, * useless repetition). Add the same now. */ other_parts_constr = - makeBoolExpr(AND_EXPR, - lappend(get_range_nulltest(key), - list_length(or_expr_args) > 1 - ? makeBoolExpr(OR_EXPR, or_expr_args, - -1) - : linitial(or_expr_args)), - -1); + makeBoolExpr(AND_EXPR, + lappend(get_range_nulltest(key), + list_length(or_expr_args) > 1 + ? makeBoolExpr(OR_EXPR, or_expr_args, + -1) + : linitial(or_expr_args)), + -1); /* * Finally, the default partition contains everything *NOT* * contained in the non-default partitions. */ result = list_make1(makeBoolExpr(NOT_EXPR, - list_make1(other_parts_constr), -1)); + list_make1(other_parts_constr), -1)); } return result; @@ -2502,9 +2502,9 @@ generate_partition_qual(Relation rel) int get_partition_for_tuple(Relation relation, Datum *values, bool *isnull) { - int bound_offset; - int part_index = -1; - PartitionKey key = RelationGetPartitionKey(relation); + int bound_offset; + int part_index = -1; + PartitionKey key = RelationGetPartitionKey(relation); PartitionDesc partdesc = RelationGetPartitionDesc(relation); /* Route as appropriate based on partitioning strategy. */ @@ -2513,8 +2513,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull) case PARTITION_STRATEGY_HASH: { PartitionBoundInfo boundinfo = partdesc->boundinfo; - int greatest_modulus = get_greatest_modulus(boundinfo); - uint64 rowHash = compute_hash_value(key, values, isnull); + int greatest_modulus = get_greatest_modulus(boundinfo); + uint64 rowHash = compute_hash_value(key, values, isnull); part_index = boundinfo->indexes[rowHash % greatest_modulus]; } @@ -2548,8 +2548,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull) /* * No range includes NULL, so this will be accepted by the - * default partition if there is one, and otherwise - * rejected. + * default partition if there is one, and otherwise rejected. */ for (i = 0; i < key->partnatts; i++) { @@ -2563,7 +2562,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull) if (!range_partkey_has_null) { bound_offset = partition_bound_bsearch(key, - partdesc->boundinfo, + partdesc->boundinfo, values, false, &equal); @@ -2585,8 +2584,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull) } /* - * part_index < 0 means we failed to find a partition of this parent. - * Use the default partition, if there is one. + * part_index < 0 means we failed to find a partition of this parent. Use + * the default partition, if there is one. */ if (part_index < 0) part_index = partdesc->boundinfo->default_index; @@ -3125,7 +3124,7 @@ satisfies_hash_partition(PG_FUNCTION_ARGS) bool variadic_typbyval; char variadic_typalign; FmgrInfo partsupfunc[PARTITION_MAX_KEYS]; - } ColumnsHashData; + } ColumnsHashData; Oid parentId; int modulus; int remainder; diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index d6b235ca79..13eb9e34ba 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -168,7 +168,7 @@ typedef struct CopyStateData PartitionDispatch *partition_dispatch_info; int num_dispatch; /* Number of entries in the above array */ int num_partitions; /* Number of members in the following arrays */ - ResultRelInfo **partitions; /* Per partition result relation pointers */ + ResultRelInfo **partitions; /* Per partition result relation pointers */ TupleConversionMap **partition_tupconv_maps; TupleTableSlot *partition_tuple_slot; TransitionCaptureState *transition_capture; @@ -360,7 +360,7 @@ SendCopyBegin(CopyState cstate) pq_sendbyte(&buf, format); /* overall format */ pq_sendint16(&buf, natts); for (i = 0; i < natts; i++) - pq_sendint16(&buf, format); /* per-column formats */ + pq_sendint16(&buf, format); /* per-column formats */ pq_endmessage(&buf); cstate->copy_dest = COPY_NEW_FE; } @@ -393,7 +393,7 @@ ReceiveCopyBegin(CopyState cstate) pq_sendbyte(&buf, format); /* overall format */ pq_sendint16(&buf, natts); for (i = 0; i < natts; i++) - pq_sendint16(&buf, format); /* per-column formats */ + pq_sendint16(&buf, format); /* per-column formats */ pq_endmessage(&buf); cstate->copy_dest = COPY_NEW_FE; cstate->fe_msgbuf = makeStringInfo(); diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 6587db77ac..20ce431e46 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -355,7 +355,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, params->log_min_duration)) { StringInfoData buf; - char *msgfmt; + char *msgfmt; TimestampDifference(starttime, endtime, &secs, &usecs); diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 2fc411a9b5..59a0ca4597 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -184,10 +184,10 @@ ExecFindPartition(ResultRelInfo *resultRelInfo, PartitionDispatch *pd, parent = pd[0]; while (true) { - PartitionDesc partdesc; + PartitionDesc partdesc; TupleTableSlot *myslot = parent->tupslot; TupleConversionMap *map = parent->tupmap; - int cur_index = -1; + int cur_index = -1; rel = parent->reldesc; partdesc = RelationGetPartitionDesc(rel); diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 201c607002..1e3ece9b34 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -1518,8 +1518,8 @@ ExecSetupTransitionCaptureState(ModifyTableState *mtstate, EState *estate) if (mtstate->mt_partition_dispatch_info != NULL) { /* - * For tuple routing among partitions, we need TupleDescs based - * on the partition routing table. + * For tuple routing among partitions, we need TupleDescs based on + * the partition routing table. */ ResultRelInfo **resultRelInfos = mtstate->mt_partitions; diff --git a/src/backend/libpq/auth-scram.c b/src/backend/libpq/auth-scram.c index 22103ce479..15c3857f57 100644 --- a/src/backend/libpq/auth-scram.c +++ b/src/backend/libpq/auth-scram.c @@ -791,6 +791,7 @@ read_client_first_message(scram_state *state, char *input) switch (*input) { case 'n': + /* * The client does not support channel binding or has simply * decided to not use it. In that case just let it go. @@ -805,6 +806,7 @@ read_client_first_message(scram_state *state, char *input) input++; break; case 'y': + /* * The client supports channel binding and thinks that the server * does not. In this case, the server must fail authentication if @@ -827,12 +829,13 @@ read_client_first_message(scram_state *state, char *input) input++; break; case 'p': + /* * The client requires channel binding. Channel binding type * follows, e.g., "p=tls-unique". */ { - char *channel_binding_type; + char *channel_binding_type; if (!state->ssl_in_use) { @@ -1139,8 +1142,8 @@ read_client_final_message(scram_state *state, char *input) b64_message[b64_message_len] = '\0'; /* - * Compare the value sent by the client with the value expected by - * the server. + * Compare the value sent by the client with the value expected by the + * server. */ if (strcmp(channel_binding, b64_message) != 0) ereport(ERROR, diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 2dd3328d71..19a91ca67d 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -100,7 +100,8 @@ static struct pam_conv pam_passw_conv = { NULL }; -static const char *pam_passwd = NULL; /* Workaround for Solaris 2.6 brokenness */ +static const char *pam_passwd = NULL; /* Workaround for Solaris 2.6 + * brokenness */ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into * pam_passwd_conv_proc */ #endif /* USE_PAM */ @@ -914,6 +915,7 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail) pfree(sasl_mechs); #ifdef USE_SSL + /* * Get data for channel binding. */ @@ -2343,7 +2345,7 @@ CheckBSDAuth(Port *port, char *user) */ #ifdef USE_LDAP -static int errdetail_for_ldap(LDAP *ldap); +static int errdetail_for_ldap(LDAP *ldap); /* * Initialize a connection to the LDAP server, including setting up @@ -2514,7 +2516,7 @@ CheckLDAPAuth(Port *port) char *filter; LDAPMessage *search_message; LDAPMessage *entry; - char *attributes[] = { LDAP_NO_ATTRS, NULL }; + char *attributes[] = {LDAP_NO_ATTRS, NULL}; char *dn; char *c; int count; diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 28a7f7ec45..b5c41241d7 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -1795,7 +1795,7 @@ set_upper_references(PlannerInfo *root, Plan *plan, int rtoffset) static void set_param_references(PlannerInfo *root, Plan *plan) { - Assert(IsA(plan, Gather) || IsA(plan, GatherMerge)); + Assert(IsA(plan, Gather) ||IsA(plan, GatherMerge)); if (plan->lefttree->extParam) { diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index d14ef31eae..e5e2956564 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -1118,7 +1118,7 @@ is_parallel_safe(PlannerInfo *root, Node *node) foreach(l2, initsubplan->setParam) context.safe_param_ids = lcons_int(lfirst_int(l2), - context.safe_param_ids); + context.safe_param_ids); } } diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 68dee0f501..02bbbc0647 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -2412,7 +2412,7 @@ apply_projection_to_path(PlannerInfo *root, * workers can help project. But if there is something that is not * parallel-safe in the target expressions, then we can't. */ - if ((IsA(path, GatherPath) || IsA(path, GatherMergePath)) && + if ((IsA(path, GatherPath) ||IsA(path, GatherMergePath)) && is_parallel_safe(root, (Node *) target->exprs)) { /* @@ -2421,9 +2421,9 @@ apply_projection_to_path(PlannerInfo *root, * It seems unlikely at present that there could be any other * references to the subpath, but better safe than sorry. * - * Note that we don't change the parallel path's cost estimates; it might - * be appropriate to do so, to reflect the fact that the bulk of the - * target evaluation will happen in workers. + * Note that we don't change the parallel path's cost estimates; it + * might be appropriate to do so, to reflect the fact that the bulk of + * the target evaluation will happen in workers. */ if (IsA(path, GatherPath)) { diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 9d35a41e22..199a2631a1 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -1825,7 +1825,7 @@ set_relation_partition_info(PlannerInfo *root, RelOptInfo *rel, Relation relation) { PartitionDesc partdesc; - PartitionKey partkey; + PartitionKey partkey; Assert(relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE); @@ -1890,8 +1890,8 @@ find_partition_scheme(PlannerInfo *root, Relation relation) /* * Did not find matching partition scheme. Create one copying relevant - * information from the relcache. We need to copy the contents of the array - * since the relcache entry may not survive after we have closed the + * information from the relcache. We need to copy the contents of the + * array since the relcache entry may not survive after we have closed the * relation. */ part_scheme = (PartitionScheme) palloc0(sizeof(PartitionSchemeData)); diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index cb94c318a7..674cfc6b06 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -873,11 +873,11 @@ build_joinrel_tlist(PlannerInfo *root, RelOptInfo *joinrel, continue; /* - * Otherwise, anything in a baserel or joinrel targetlist ought to be a - * Var. Children of a partitioned table may have ConvertRowtypeExpr - * translating whole-row Var of a child to that of the parent. Children - * of an inherited table or subquery child rels can not directly - * participate in a join, so other kinds of nodes here. + * Otherwise, anything in a baserel or joinrel targetlist ought to be + * a Var. Children of a partitioned table may have ConvertRowtypeExpr + * translating whole-row Var of a child to that of the parent. + * Children of an inherited table or subquery child rels can not + * directly participate in a join, so other kinds of nodes here. */ if (IsA(var, Var)) { @@ -901,7 +901,7 @@ build_joinrel_tlist(PlannerInfo *root, RelOptInfo *joinrel, child_expr = (ConvertRowtypeExpr *) childvar; childvar = (Var *) child_expr->arg; } - Assert(IsA(childvar, Var) && childvar->varattno == 0); + Assert(IsA(childvar, Var) &&childvar->varattno == 0); baserel = find_base_rel(root, childvar->varno); ndx = 0 - baserel->min_attr; @@ -1666,18 +1666,19 @@ build_joinrel_partition_info(RelOptInfo *joinrel, RelOptInfo *outer_rel, partnatts = joinrel->part_scheme->partnatts; joinrel->partexprs = (List **) palloc0(sizeof(List *) * partnatts); joinrel->nullable_partexprs = - (List **) palloc0(sizeof(List *) *partnatts); + (List **) palloc0(sizeof(List *) * partnatts); /* * Construct partition keys for the join. * * An INNER join between two partitioned relations can be regarded as - * partitioned by either key expression. For example, A INNER JOIN B ON A.a = - * B.b can be regarded as partitioned on A.a or on B.b; they are equivalent. + * partitioned by either key expression. For example, A INNER JOIN B ON + * A.a = B.b can be regarded as partitioned on A.a or on B.b; they are + * equivalent. * * For a SEMI or ANTI join, the result can only be regarded as being - * partitioned in the same manner as the outer side, since the inner columns - * are not retained. + * partitioned in the same manner as the outer side, since the inner + * columns are not retained. * * An OUTER join like (A LEFT JOIN B ON A.a = B.b) may produce rows with * B.b NULL. These rows may not fit the partitioning conditions imposed on @@ -1686,11 +1687,12 @@ build_joinrel_partition_info(RelOptInfo *joinrel, RelOptInfo *outer_rel, * expressions from the OUTER side only. However, because all * commonly-used comparison operators are strict, the presence of nulls on * the outer side doesn't cause any problem; they can't match anything at - * future join levels anyway. Therefore, we track two sets of expressions: - * those that authentically partition the relation (partexprs) and those - * that partition the relation with the exception that extra nulls may be - * present (nullable_partexprs). When the comparison operator is strict, - * the latter is just as good as the former. + * future join levels anyway. Therefore, we track two sets of + * expressions: those that authentically partition the relation + * (partexprs) and those that partition the relation with the exception + * that extra nulls may be present (nullable_partexprs). When the + * comparison operator is strict, the latter is just as good as the + * former. */ for (cnt = 0; cnt < partnatts; cnt++) { diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index 4a3c4b4cc9..f752a12713 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -1253,7 +1253,7 @@ GetBackgroundWorkerTypeByPid(pid_t pid) { int slotno; bool found = false; - static char result[BGW_MAXLEN]; + static char result[BGW_MAXLEN]; LWLockAcquire(BackgroundWorkerLock, LW_SHARED); diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index a3d4917173..94a4609371 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2161,8 +2161,8 @@ retry1: /* * If the client requested a newer protocol version or if the client * requested any protocol options we didn't recognize, let them know - * the newest minor protocol version we do support and the names of any - * unrecognized options. + * the newest minor protocol version we do support and the names of + * any unrecognized options. */ if (PG_PROTOCOL_MINOR(proto) > PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST) || unrecognized_protocol_options != NIL) @@ -4316,8 +4316,8 @@ BackendInitialize(Port *port) * * postgres: walsender * - * To achieve that, we pass "walsender" as username and username - * as dbname to init_ps_display(). XXX: should add a new variant of + * To achieve that, we pass "walsender" as username and username as dbname + * to init_ps_display(). XXX: should add a new variant of * init_ps_display() to avoid abusing the parameters like this. */ if (am_walsender) diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index cbcb3dbec3..ebb8fde3bc 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -278,7 +278,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) /* Send CopyOutResponse message */ pq_beginmessage(&buf, 'H'); pq_sendbyte(&buf, 0); /* overall format */ - pq_sendint16(&buf, 0); /* natts */ + pq_sendint16(&buf, 0); /* natts */ pq_endmessage(&buf); if (ti->path == NULL) @@ -744,7 +744,7 @@ SendBackupHeader(List *tablespaces) pq_sendstring(&buf, "spcoid"); pq_sendint32(&buf, 0); /* table oid */ pq_sendint16(&buf, 0); /* attnum */ - pq_sendint32(&buf, OIDOID); /* type oid */ + pq_sendint32(&buf, OIDOID); /* type oid */ pq_sendint16(&buf, 4); /* typlen */ pq_sendint32(&buf, 0); /* typmod */ pq_sendint16(&buf, 0); /* format code */ @@ -774,10 +774,10 @@ SendBackupHeader(List *tablespaces) /* Send one datarow message */ pq_beginmessage(&buf, 'D'); - pq_sendint16(&buf, 3); /* number of columns */ + pq_sendint16(&buf, 3); /* number of columns */ if (ti->path == NULL) { - pq_sendint32(&buf, -1); /* Length = -1 ==> NULL */ + pq_sendint32(&buf, -1); /* Length = -1 ==> NULL */ pq_sendint32(&buf, -1); } else @@ -795,7 +795,7 @@ SendBackupHeader(List *tablespaces) if (ti->size >= 0) send_int8_string(&buf, ti->size / 1024); else - pq_sendint32(&buf, -1); /* NULL */ + pq_sendint32(&buf, -1); /* NULL */ pq_endmessage(&buf); } diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index dc0ad5b0e7..fa95bab58e 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -246,8 +246,8 @@ ReorderBufferAllocate(void) sizeof(ReorderBufferTXN)); buffer->tup_context = GenerationContextCreate(new_ctx, - "Tuples", - SLAB_LARGE_BLOCK_SIZE); + "Tuples", + SLAB_LARGE_BLOCK_SIZE); hash_ctl.keysize = sizeof(TransactionId); hash_ctl.entrysize = sizeof(ReorderBufferTXNByIdEnt); diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 5d5b7dd95e..ac4ce9ce62 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -601,7 +601,7 @@ smgrextend(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, char *buffer, bool skipFsync) { smgrsw[reln->smgr_which].smgr_extend(reln, forknum, blocknum, - buffer, skipFsync); + buffer, skipFsync); } /* @@ -648,7 +648,7 @@ smgrwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, char *buffer, bool skipFsync) { smgrsw[reln->smgr_which].smgr_write(reln, forknum, blocknum, - buffer, skipFsync); + buffer, skipFsync); } @@ -661,7 +661,7 @@ smgrwriteback(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, BlockNumber nblocks) { smgrsw[reln->smgr_which].smgr_writeback(reln, forknum, blocknum, - nblocks); + nblocks); } /* diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 05c5c194ec..1ae9ac2d57 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2374,8 +2374,8 @@ exec_describe_statement_message(const char *stmt_name) /* * First describe the parameters... */ - pq_beginmessage_reuse(&row_description_buf, 't'); /* parameter description - * message type */ + pq_beginmessage_reuse(&row_description_buf, 't'); /* parameter description + * message type */ pq_sendint16(&row_description_buf, psrc->num_params); for (i = 0; i < psrc->num_params; i++) @@ -2952,14 +2952,14 @@ ProcessInterrupts(void) /* * Don't allow query cancel interrupts while reading input from the * client, because we might lose sync in the FE/BE protocol. (Die - * interrupts are OK, because we won't read any further messages from - * the client in that case.) + * interrupts are OK, because we won't read any further messages from the + * client in that case.) */ if (QueryCancelPending && QueryCancelHoldoffCount != 0) { /* - * Re-arm InterruptPending so that we process the cancel request - * as soon as we're done reading the message. + * Re-arm InterruptPending so that we process the cancel request as + * soon as we're done reading the message. */ InterruptPending = true; } @@ -4494,10 +4494,10 @@ ShowUsage(const char *title) appendStringInfo(&str, "!\t%ld kB max resident size\n", #if defined(__darwin__) - /* in bytes on macOS */ - r.ru_maxrss/1024 + /* in bytes on macOS */ + r.ru_maxrss / 1024 #else - /* in kilobytes on most other platforms */ + /* in kilobytes on most other platforms */ r.ru_maxrss #endif ); diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index e70e901066..9a09ffb20a 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -202,7 +202,7 @@ static int cmpspellaffix(const void *s1, const void *s2) { return strcmp((*(SPELL *const *) s1)->p.flag, - (*(SPELL *const *) s2)->p.flag); + (*(SPELL *const *) s2)->p.flag); } static int diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 04e737d080..307b5e8629 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -2231,7 +2231,7 @@ timetz_hash_extended(PG_FUNCTION_ARGS) Int64GetDatumFast(key->time), seed)); thash ^= DatumGetUInt64(hash_uint32_extended(key->zone, - DatumGetInt64(seed))); + DatumGetInt64(seed))); PG_RETURN_UINT64(thash); } diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 8d9e7c10ae..04cf209b5b 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -921,8 +921,8 @@ pg_stat_get_backend_activity(PG_FUNCTION_ARGS) int32 beid = PG_GETARG_INT32(0); PgBackendStatus *beentry; const char *activity; - char *clipped_activity; - text *ret; + char *clipped_activity; + text *ret; if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL) activity = ""; diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c index 31342ad69b..19390fa581 100644 --- a/src/backend/utils/mmgr/generation.c +++ b/src/backend/utils/mmgr/generation.c @@ -46,7 +46,7 @@ #define Generation_BLOCKHDRSZ MAXALIGN(sizeof(GenerationBlock)) #define Generation_CHUNKHDRSZ sizeof(GenerationChunk) -typedef struct GenerationBlock GenerationBlock; /* forward reference */ +typedef struct GenerationBlock GenerationBlock; /* forward reference */ typedef struct GenerationChunk GenerationChunk; typedef void *GenerationPointer; @@ -62,9 +62,9 @@ typedef struct GenerationContext /* Generational context parameters */ Size blockSize; /* standard block size */ - GenerationBlock *block; /* current (most recently allocated) block */ + GenerationBlock *block; /* current (most recently allocated) block */ dlist_head blocks; /* list of blocks */ -} GenerationContext; +} GenerationContext; /* * GenerationBlock @@ -155,7 +155,7 @@ static void GenerationDelete(MemoryContext context); static Size GenerationGetChunkSpace(MemoryContext context, void *pointer); static bool GenerationIsEmpty(MemoryContext context); static void GenerationStats(MemoryContext context, int level, bool print, - MemoryContextCounters *totals); + MemoryContextCounters *totals); #ifdef MEMORY_CONTEXT_CHECKING static void GenerationCheck(MemoryContext context); @@ -207,10 +207,10 @@ static MemoryContextMethods GenerationMethods = { */ MemoryContext GenerationContextCreate(MemoryContext parent, - const char *name, - Size blockSize) + const char *name, + Size blockSize) { - GenerationContext *set; + GenerationContext *set; /* Assert we padded GenerationChunk properly */ StaticAssertStmt(Generation_CHUNKHDRSZ == MAXALIGN(Generation_CHUNKHDRSZ), @@ -233,10 +233,10 @@ GenerationContextCreate(MemoryContext parent, /* Do the type-independent part of context creation */ set = (GenerationContext *) MemoryContextCreate(T_GenerationContext, - sizeof(GenerationContext), - &GenerationMethods, - parent, - name); + sizeof(GenerationContext), + &GenerationMethods, + parent, + name); set->blockSize = blockSize; @@ -250,7 +250,7 @@ GenerationContextCreate(MemoryContext parent, static void GenerationInit(MemoryContext context) { - GenerationContext *set = (GenerationContext *) context; + GenerationContext *set = (GenerationContext *) context; set->block = NULL; dlist_init(&set->blocks); @@ -266,7 +266,7 @@ GenerationInit(MemoryContext context) static void GenerationReset(MemoryContext context) { - GenerationContext *set = (GenerationContext *) context; + GenerationContext *set = (GenerationContext *) context; dlist_mutable_iter miter; AssertArg(GenerationIsValid(set)); @@ -324,9 +324,9 @@ GenerationDelete(MemoryContext context) static void * GenerationAlloc(MemoryContext context, Size size) { - GenerationContext *set = (GenerationContext *) context; - GenerationBlock *block; - GenerationChunk *chunk; + GenerationContext *set = (GenerationContext *) context; + GenerationBlock *block; + GenerationChunk *chunk; Size chunk_size = MAXALIGN(size); /* is it an over-sized chunk? if yes, allocate special block */ @@ -460,9 +460,9 @@ GenerationAlloc(MemoryContext context, Size size) static void GenerationFree(MemoryContext context, void *pointer) { - GenerationContext *set = (GenerationContext *) context; - GenerationChunk *chunk = GenerationPointerGetChunk(pointer); - GenerationBlock *block; + GenerationContext *set = (GenerationContext *) context; + GenerationChunk *chunk = GenerationPointerGetChunk(pointer); + GenerationBlock *block; /* Allow access to private part of chunk header. */ VALGRIND_MAKE_MEM_DEFINED(chunk, GENERATIONCHUNK_PRIVATE_LEN); @@ -474,7 +474,7 @@ GenerationFree(MemoryContext context, void *pointer) if (chunk->requested_size < chunk->size) if (!sentinel_ok(pointer, chunk->requested_size)) elog(WARNING, "detected write past chunk end in %s %p", - ((MemoryContext)set)->name, chunk); + ((MemoryContext) set)->name, chunk); #endif #ifdef CLOBBER_FREED_MEMORY @@ -520,9 +520,9 @@ GenerationFree(MemoryContext context, void *pointer) static void * GenerationRealloc(MemoryContext context, void *pointer, Size size) { - GenerationContext *set = (GenerationContext *) context; - GenerationChunk *chunk = GenerationPointerGetChunk(pointer); - GenerationPointer newPointer; + GenerationContext *set = (GenerationContext *) context; + GenerationChunk *chunk = GenerationPointerGetChunk(pointer); + GenerationPointer newPointer; Size oldsize; /* Allow access to private part of chunk header. */ @@ -535,7 +535,7 @@ GenerationRealloc(MemoryContext context, void *pointer, Size size) if (chunk->requested_size < oldsize) if (!sentinel_ok(pointer, chunk->requested_size)) elog(WARNING, "detected write past chunk end in %s %p", - ((MemoryContext)set)->name, chunk); + ((MemoryContext) set)->name, chunk); #endif /* @@ -652,7 +652,7 @@ GenerationGetChunkSpace(MemoryContext context, void *pointer) static bool GenerationIsEmpty(MemoryContext context) { - GenerationContext *set = (GenerationContext *) context; + GenerationContext *set = (GenerationContext *) context; return dlist_is_empty(&set->blocks); } @@ -670,9 +670,9 @@ GenerationIsEmpty(MemoryContext context) */ static void GenerationStats(MemoryContext context, int level, bool print, - MemoryContextCounters *totals) + MemoryContextCounters *totals) { - GenerationContext *set = (GenerationContext *) context; + GenerationContext *set = (GenerationContext *) context; Size nblocks = 0; Size nchunks = 0; Size nfreechunks = 0; @@ -698,8 +698,8 @@ GenerationStats(MemoryContext context, int level, bool print, for (i = 0; i < level; i++) fprintf(stderr, " "); fprintf(stderr, - "Generation: %s: %zu total in %zd blocks (%zd chunks); %zu free (%zd chunks); %zu used\n", - ((MemoryContext)set)->name, totalspace, nblocks, nchunks, freespace, + "Generation: %s: %zu total in %zd blocks (%zd chunks); %zu free (%zd chunks); %zu used\n", + ((MemoryContext) set)->name, totalspace, nblocks, nchunks, freespace, nfreechunks, totalspace - freespace); } @@ -726,7 +726,7 @@ GenerationStats(MemoryContext context, int level, bool print, static void GenerationCheck(MemoryContext context) { - GenerationContext *gen = (GenerationContext *) context; + GenerationContext *gen = (GenerationContext *) context; char *name = context->name; dlist_iter iter; @@ -818,4 +818,4 @@ GenerationCheck(MemoryContext context) } } -#endif /* MEMORY_CONTEXT_CHECKING */ +#endif /* MEMORY_CONTEXT_CHECKING */ diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 34af8d6334..3c23ac75a0 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -1591,8 +1591,7 @@ puttuple_common(Tuplesortstate *state, SortTuple *tuple) case TSS_BUILDRUNS: /* - * Save the tuple into the unsorted array (there must be - * space) + * Save the tuple into the unsorted array (there must be space) */ state->memtuples[state->memtupcount++] = *tuple; @@ -2742,8 +2741,8 @@ dumptuples(Tuplesortstate *state, bool alltuples) int i; /* - * Nothing to do if we still fit in available memory and have array - * slots, unless this is the final call during initial run generation. + * Nothing to do if we still fit in available memory and have array slots, + * unless this is the final call during initial run generation. */ if (state->memtupcount < state->memtupsize && !LACKMEM(state) && !alltuples) diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index ad0d0e2ac0..ddc850db1c 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -148,7 +148,7 @@ static int wal_segment_size_mb; /* internal vars */ static const char *progname; -static int encodingid; +static int encodingid; static char *bki_file; static char *desc_file; static char *shdesc_file; @@ -239,7 +239,7 @@ static void writefile(char *path, char **lines); static FILE *popen_check(const char *command, const char *mode); static void exit_nicely(void) pg_attribute_noreturn(); static char *get_id(void); -static int get_encoding_id(const char *encoding_name); +static int get_encoding_id(const char *encoding_name); static void set_input(char **dest, const char *filename); static void check_input(char *path); static void write_version_file(const char *extrapath); diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index d801ea07fc..d6f0f3cb1a 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -496,7 +496,8 @@ main(int argc, char **argv) int c; int option_index; char *db_name; - uint32 hi, lo; + uint32 hi, + lo; progname = get_progname(argv[0]); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup")); diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h index 908fd68c2b..e9f1d1f536 100644 --- a/src/bin/pg_basebackup/streamutil.h +++ b/src/bin/pg_basebackup/streamutil.h @@ -33,9 +33,9 @@ extern PGconn *GetConnection(void); /* Replication commands */ extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name, - const char *plugin, bool is_temporary, - bool is_physical, bool reserve_wal, - bool slot_exists_ok); + const char *plugin, bool is_temporary, + bool is_physical, bool reserve_wal, + bool slot_exists_ok); extern bool DropReplicationSlot(PGconn *conn, const char *slot_name); extern bool RunIdentifySystem(PGconn *conn, char **sysid, TimeLineID *starttli, diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 99167104d4..804a84a0c9 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2939,7 +2939,7 @@ describeOneTableDetails(const char *schemaname, } else { - char *partitioned_note; + char *partitioned_note; if (*PQgetvalue(result, i, 2) == RELKIND_PARTITIONED_TABLE) partitioned_note = ", PARTITIONED"; diff --git a/src/include/access/hash.h b/src/include/access/hash.h index e3135c1738..ccdf9dff4b 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -133,7 +133,7 @@ typedef struct HashScanPosData int itemIndex; /* current index in items[] */ HashScanPosItem items[MaxIndexTuplesPerPage]; /* MUST BE LAST */ -} HashScanPosData; +} HashScanPosData; #define HashScanPosIsPinned(scanpos) \ ( \ diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index 295e9d224e..2983cfa217 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -69,6 +69,6 @@ extern List *get_proposed_default_constraint(List *new_part_constaints); /* For tuple routing */ extern int get_partition_for_tuple(Relation relation, Datum *values, - bool *isnull); + bool *isnull); #endif /* PARTITION_H */ diff --git a/src/include/executor/execParallel.h b/src/include/executor/execParallel.h index 99a13f3b7d..f093f95232 100644 --- a/src/include/executor/execParallel.h +++ b/src/include/executor/execParallel.h @@ -28,7 +28,7 @@ typedef struct ParallelExecutorInfo BufferUsage *buffer_usage; /* points to bufusage area in DSM */ SharedExecutorInstrumentation *instrumentation; /* optional */ dsa_area *area; /* points to DSA area in DSM */ - dsa_pointer param_exec; /* serialized PARAM_EXEC parameters */ + dsa_pointer param_exec; /* serialized PARAM_EXEC parameters */ bool finished; /* set true by ExecParallelFinish */ /* These two arrays have pcxt->nworkers_launched entries: */ shm_mq_handle **tqueue; /* tuple queues for worker output */ diff --git a/src/include/executor/execPartition.h b/src/include/executor/execPartition.h index 64e5aab4eb..43ca9908aa 100644 --- a/src/include/executor/execPartition.h +++ b/src/include/executor/execPartition.h @@ -38,13 +38,13 @@ */ typedef struct PartitionDispatchData { - Relation reldesc; - PartitionKey key; - List *keystate; /* list of ExprState */ - PartitionDesc partdesc; + Relation reldesc; + PartitionKey key; + List *keystate; /* list of ExprState */ + PartitionDesc partdesc; TupleTableSlot *tupslot; TupleConversionMap *tupmap; - int *indexes; + int *indexes; } PartitionDispatchData; typedef struct PartitionDispatchData *PartitionDispatch; diff --git a/src/include/fe_utils/psqlscan_int.h b/src/include/fe_utils/psqlscan_int.h index e9b351756b..2653344701 100644 --- a/src/include/fe_utils/psqlscan_int.h +++ b/src/include/fe_utils/psqlscan_int.h @@ -143,6 +143,6 @@ extern void psqlscan_escape_variable(PsqlScanState state, const char *txt, int len, PsqlScanQuoteType quote); extern void psqlscan_test_variable(PsqlScanState state, - const char *txt, int len); + const char *txt, int len); #endif /* PSQLSCAN_INT_H */ diff --git a/src/include/lib/dshash.h b/src/include/lib/dshash.h index 362871bfe0..220553c0d9 100644 --- a/src/include/lib/dshash.h +++ b/src/include/lib/dshash.h @@ -81,7 +81,7 @@ extern void dshash_delete_entry(dshash_table *hash_table, void *entry); extern void dshash_release_lock(dshash_table *hash_table, void *entry); /* Convenience hash and compare functions wrapping memcmp and tag_hash. */ -extern int dshash_memcmp(const void *a, const void *b, size_t size, void *arg); +extern int dshash_memcmp(const void *a, const void *b, size_t size, void *arg); extern dshash_hash dshash_memhash(const void *v, size_t size, void *arg); /* Debugging support. */ diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 01b845db44..906ae5e980 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -149,7 +149,7 @@ extern void appendBinaryStringInfo(StringInfo str, * if necessary. Does not ensure a trailing null-byte exists. */ extern void appendBinaryStringInfoNT(StringInfo str, - const char *data, int datalen); + const char *data, int datalen); /*------------------------ * enlargeStringInfo diff --git a/src/include/libpq/scram.h b/src/include/libpq/scram.h index 99560d3d2f..91f1e0f2c7 100644 --- a/src/include/libpq/scram.h +++ b/src/include/libpq/scram.h @@ -15,7 +15,7 @@ /* Name of SCRAM mechanisms per IANA */ #define SCRAM_SHA256_NAME "SCRAM-SHA-256" -#define SCRAM_SHA256_PLUS_NAME "SCRAM-SHA-256-PLUS" /* with channel binding */ +#define SCRAM_SHA256_PLUS_NAME "SCRAM-SHA-256-PLUS" /* with channel binding */ /* Channel binding types */ #define SCRAM_CHANNEL_BINDING_TLS_UNIQUE "tls-unique" @@ -27,8 +27,8 @@ /* Routines dedicated to authentication */ extern void *pg_be_scram_init(const char *username, const char *shadow_pass, - bool ssl_in_use, const char *tls_finished_message, - size_t tls_finished_len); + bool ssl_in_use, const char *tls_finished_message, + size_t tls_finished_len); extern int pg_be_scram_exchange(void *opaq, char *input, int inputlen, char **output, int *outputlen, char **logdetail); diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 9e68e65cc6..51df8e9741 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -660,7 +660,7 @@ typedef struct RelOptInfo struct RelOptInfo **part_rels; /* Array of RelOptInfos of partitions, * stored in the same order of bounds */ List **partexprs; /* Non-nullable partition key expressions. */ - List **nullable_partexprs; /* Nullable partition key expressions. */ + List **nullable_partexprs; /* Nullable partition key expressions. */ } RelOptInfo; /* diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index aa130cdb84..41335b8e75 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -245,7 +245,7 @@ extern bool log_btree_build_stats; extern PGDLLIMPORT bool check_function_bodies; extern bool default_with_oids; -extern bool session_auth_is_superuser; +extern bool session_auth_is_superuser; extern int log_min_error_statement; extern int log_min_messages; diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index ff8e5d7d79..d177b0cc8d 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -157,8 +157,8 @@ extern MemoryContext SlabContextCreate(MemoryContext parent, /* generation.c */ extern MemoryContext GenerationContextCreate(MemoryContext parent, - const char *name, - Size blockSize); + const char *name, + Size blockSize); /* * Recommended default alloc parameters, suitable for "ordinary" contexts diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 8f901a83fb..871e2011f3 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -55,7 +55,8 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa if (INFORMIX_MODE(compat) && **scan_length == '.') { /* skip invalid characters */ - do { + do + { (*scan_length)++; } while (isdigit((unsigned char) **scan_length)); } diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 7776813d1b..7d6d7d0754 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1109,7 +1109,7 @@ ecpg_build_params(struct statement *stmt) struct variable *var; int desc_counter = 0; int position = 0; - const char *value; + const char *value; bool std_strings = false; /* Get standard_conforming_strings setting. */ diff --git a/src/interfaces/libpq/fe-auth-scram.c b/src/interfaces/libpq/fe-auth-scram.c index f2403147ca..97db0b1faa 100644 --- a/src/interfaces/libpq/fe-auth-scram.c +++ b/src/interfaces/libpq/fe-auth-scram.c @@ -491,9 +491,9 @@ build_client_final_message(fe_scram_state *state, PQExpBuffer errormessage) free(cbind_input); } else if (state->ssl_in_use) - appendPQExpBuffer(&buf, "c=eSws"); /* base64 of "y,," */ + appendPQExpBuffer(&buf, "c=eSws"); /* base64 of "y,," */ else - appendPQExpBuffer(&buf, "c=biws"); /* base64 of "n,," */ + appendPQExpBuffer(&buf, "c=biws"); /* base64 of "n,," */ if (PQExpBufferDataBroken(buf)) goto oom_error; diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 9d394919ef..f54ad8e0cc 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -534,7 +534,7 @@ pg_SASL_init(PGconn *conn, int payloadlen) */ if (conn->ssl_in_use && strcmp(mechanism_buf.data, SCRAM_SHA256_PLUS_NAME) == 0) - selected_mechanism = SCRAM_SHA256_PLUS_NAME; + selected_mechanism = SCRAM_SHA256_PLUS_NAME; else if (strcmp(mechanism_buf.data, SCRAM_SHA256_NAME) == 0 && !selected_mechanism) selected_mechanism = SCRAM_SHA256_NAME; @@ -569,6 +569,7 @@ pg_SASL_init(PGconn *conn, int payloadlen) } #ifdef USE_SSL + /* * Get data for channel binding. */ @@ -581,8 +582,8 @@ pg_SASL_init(PGconn *conn, int payloadlen) #endif /* - * Initialize the SASL state information with all the information - * gathered during the initial exchange. + * Initialize the SASL state information with all the information gathered + * during the initial exchange. * * Note: Only tls-unique is supported for the moment. */ diff --git a/src/interfaces/libpq/fe-auth.h b/src/interfaces/libpq/fe-auth.h index 1525a52742..3e92410eae 100644 --- a/src/interfaces/libpq/fe-auth.h +++ b/src/interfaces/libpq/fe-auth.h @@ -24,11 +24,11 @@ extern char *pg_fe_getauthname(PQExpBuffer errorMessage); /* Prototypes for functions in fe-auth-scram.c */ extern void *pg_fe_scram_init(const char *username, - const char *password, - bool ssl_in_use, - const char *sasl_mechanism, - char *tls_finished_message, - size_t tls_finished_len); + const char *password, + bool ssl_in_use, + const char *sasl_mechanism, + char *tls_finished_message, + size_t tls_finished_len); extern void pg_fe_scram_free(void *opaq); extern void pg_fe_scram_exchange(void *opaq, char *input, int inputlen, char **output, int *outputlen, diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 7a6dd15460..cf6120eea9 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -6617,8 +6617,8 @@ exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan) if (IsA(tle_expr, Const)) break; /* Otherwise, it had better be a Param or an outer Var */ - Assert(IsA(tle_expr, Param) || (IsA(tle_expr, Var) && - ((Var *) tle_expr)->varno == OUTER_VAR)); + Assert(IsA(tle_expr, Param) ||(IsA(tle_expr, Var) && + ((Var *) tle_expr)->varno == OUTER_VAR)); /* Descend to the child node */ plan = plan->lefttree; } diff --git a/src/test/thread/thread_test.c b/src/test/thread/thread_test.c index 282a95872c..2501ca22b1 100644 --- a/src/test/thread/thread_test.c +++ b/src/test/thread/thread_test.c @@ -80,23 +80,23 @@ static volatile int errno2_set = 0; #ifndef HAVE_STRERROR_R static char *strerror_p1; static char *strerror_p2; -static int strerror_threadsafe = 0; +static int strerror_threadsafe = 0; #endif #if !defined(WIN32) && !defined(HAVE_GETPWUID_R) static struct passwd *passwd_p1; static struct passwd *passwd_p2; -static int getpwuid_threadsafe = 0; +static int getpwuid_threadsafe = 0; #endif #if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R) static struct hostent *hostent_p1; static struct hostent *hostent_p2; static char myhostname[MAXHOSTNAMELEN]; -static int gethostbyname_threadsafe = 0; +static int gethostbyname_threadsafe = 0; #endif -static int platform_is_threadsafe = 1; +static int platform_is_threadsafe = 1; int main(int argc, char *argv[]) diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index b422050a92..3e84720038 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -34,6 +34,9 @@ AfterTriggerEventList AfterTriggerShared AfterTriggerSharedData AfterTriggersData +AfterTriggersQueryData +AfterTriggersTableData +AfterTriggersTransData Agg AggClauseCosts AggInfo @@ -125,7 +128,6 @@ ArrayMetaState ArrayParseState ArrayRef ArrayRefState -ArrayRemapInfo ArrayType AsyncQueueControl AsyncQueueEntry @@ -143,7 +145,6 @@ AutoVacOpts AutoVacuumShmemStruct AutoVacuumWorkItem AutoVacuumWorkItemType -AutovacWorkItems AuxProcType BF_ctx BF_key @@ -274,6 +275,8 @@ BuiltinScript BulkInsertState CACHESIGN CAC_state +CCFastEqualFN +CCHashFN CEOUC_WAIT_MODE CFuncHashTabEntry CHAR @@ -302,8 +305,6 @@ CatCache CatCacheHeader CatalogId CatalogIndexState -CCHashFN -CCFastEqualFN ChangeVarNodes_context CheckPoint CheckPointStmt @@ -344,6 +345,7 @@ ColumnCompareData ColumnDef ColumnIOData ColumnRef +ColumnsHashData CombinationGenerator ComboCidEntry ComboCidEntryData @@ -632,9 +634,9 @@ FieldStore File FileFdwExecutionState FileFdwPlanState -FileName FileNameMap FindSplitData +FixedParallelExecutorState FixedParallelState FixedParamState FlagMode @@ -824,6 +826,10 @@ GatherMergeState GatherPath GatherState Gene +GenerationBlock +GenerationChunk +GenerationContext +GenerationPointer GenericCosts GenericXLogState GeqoPrivateData @@ -941,6 +947,7 @@ HashPageStat HashPath HashScanOpaque HashScanOpaqueData +HashScanPosData HashScanPosItem HashSkewBucket HashState @@ -1021,13 +1028,13 @@ InsertStmt Instrumentation Int128AggState Int8TransTypeData +IntRBTreeNode InternalDefaultACL InternalGrant Interval IntoClause InvalidationChunk InvalidationListHeader -InvertedWalkNextStep IpcMemoryId IpcMemoryKey IpcSemaphoreId @@ -1217,6 +1224,7 @@ MergeJoinClause MergeJoinState MergePath MergeScanSelCache +MetaCommand MinMaxAggInfo MinMaxAggPath MinMaxExpr @@ -1454,13 +1462,18 @@ PLpgSQL_var PLpgSQL_variable PLwdatum PLword +PLyArrayToOb PLyCursorObject PLyDatumToOb PLyDatumToObFunc PLyExceptionEntry PLyExecutionContext +PLyObToArray PLyObToDatum PLyObToDatumFunc +PLyObToDomain +PLyObToScalar +PLyObToTransform PLyObToTuple PLyObject_AsString_t PLyPlanObject @@ -1470,12 +1483,11 @@ PLyProcedureKey PLyResultObject PLySRFState PLySavedArgs +PLyScalarToOb PLySubtransactionData PLySubtransactionObject +PLyTransformToOb PLyTupleToOb -PLyTypeInfo -PLyTypeInput -PLyTypeOutput PLyUnicode_FromStringAndSize_t PMINIDUMP_CALLBACK_INFORMATION PMINIDUMP_EXCEPTION_INFORMATION @@ -1565,12 +1577,13 @@ PartitionDescData PartitionDispatch PartitionDispatchData PartitionElem -PartitionKey PartitionHashBound +PartitionKey PartitionListValue PartitionRangeBound PartitionRangeDatum PartitionRangeDatumKind +PartitionScheme PartitionSpec PartitionedChildRelInfo PasswordType @@ -1670,6 +1683,7 @@ Pool PopulateArrayContext PopulateArrayState PopulateRecordCache +PopulateRecordsetCache PopulateRecordsetState Port Portal @@ -1781,7 +1795,6 @@ RangeBox RangeFunction RangeIOData RangeQueryClause -RangeRemapInfo RangeSubselect RangeTableFunc RangeTableFuncCol @@ -1794,6 +1807,7 @@ RangeVar RangeVarGetRelidCallback RawColumnDefault RawStmt +ReInitializeDSMForeignScan_function ReScanForeignScan_function ReadBufPtrType ReadBufferMode @@ -1805,8 +1819,6 @@ RecheckForeignScan_function RecordCacheEntry RecordCompareData RecordIOData -RecordRemapInfo -RecordTypmodMap RecoveryTargetAction RecoveryTargetType RectBox @@ -1866,6 +1878,7 @@ ReorderBufferTupleCidEnt ReorderBufferTupleCidKey ReorderTuple RepOriginId +ReparameterizeForeignPathByChild_function ReplaceVarsFromTargetList_context ReplaceVarsNoMatchOption ReplicaIdentityStmt @@ -2020,9 +2033,10 @@ SharedInvalRelmapMsg SharedInvalSmgrMsg SharedInvalSnapshotMsg SharedInvalidationMessage -SharedRecordTableKey SharedRecordTableEntry +SharedRecordTableKey SharedRecordTypmodRegistry +SharedSortInfo SharedTypmodTableEntry ShellTypeInfo ShippableCacheEntry @@ -2297,9 +2311,10 @@ TupleHashEntryData TupleHashIterator TupleHashTable TupleQueueReader -TupleRemapClass -TupleRemapInfo TupleTableSlot +TuplesortInstrumentation +TuplesortMethod +TuplesortSpaceType Tuplesortstate Tuplestorestate TwoPhaseCallback @@ -2329,7 +2344,6 @@ UChar UCharIterator UCollator UConverter -UEnumeration UErrorCode UINT ULARGE_INTEGER @@ -2353,6 +2367,7 @@ UserOpts VacAttrStats VacAttrStatsP VacuumParams +VacuumRelation VacuumStmt Value ValuesScan @@ -2547,6 +2562,7 @@ bgworker_main_type binaryheap binaryheap_comparator bitmapword +bits16 bits32 bits8 bool @@ -2561,7 +2577,6 @@ check_network_data check_object_relabel_type check_password_hook_type check_ungrouped_columns_context -chkpass chr clock_t cmpEntriesArg @@ -2612,7 +2627,9 @@ dsa_pointer dsa_segment_header dsa_segment_index dsa_segment_map +dshash_compare_function dshash_hash +dshash_hash_function dshash_parameters dshash_partition dshash_table