diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c index 1f1cff1a58..dd103a8689 100644 --- a/src/backend/backup/basebackup.c +++ b/src/backend/backup/basebackup.c @@ -74,7 +74,7 @@ typedef struct pg_checksum_type manifest_checksum_type; } basebackup_options; -static int64 sendTablespace(bbsink *sink, char *path, char *oid, bool sizeonly, +static int64 sendTablespace(bbsink *sink, char *path, char *spcoid, bool sizeonly, struct backup_manifest_info *manifest); static int64 sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, List *tablespaces, bool sendtblspclinks, diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 58752368e7..22635f8094 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -463,19 +463,19 @@ boot_openrel(char *relname) * ---------------- */ void -closerel(char *name) +closerel(char *relname) { - if (name) + if (relname) { if (boot_reldesc) { - if (strcmp(RelationGetRelationName(boot_reldesc), name) != 0) + if (strcmp(RelationGetRelationName(boot_reldesc), relname) != 0) elog(ERROR, "close of %s when %s was expected", - name, RelationGetRelationName(boot_reldesc)); + relname, RelationGetRelationName(boot_reldesc)); } else elog(ERROR, "close of %s before any relation was opened", - name); + relname); } if (boot_reldesc == NULL) diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 635d05405e..441f29d684 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -94,7 +94,7 @@ static void AlterEventTriggerOwner_internal(Relation rel, static void error_duplicate_filter_variable(const char *defname); static Datum filter_list_to_array(List *filterlist); static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname, - Oid evtOwner, Oid funcoid, List *tags); + Oid evtOwner, Oid funcoid, List *taglist); static void validate_ddl_tags(const char *filtervar, List *taglist); static void validate_table_rewrite_tags(const char *filtervar, List *taglist); static void EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata); diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 053d2ca5ae..f86983c660 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -111,7 +111,7 @@ static void show_incremental_sort_info(IncrementalSortState *incrsortstate, static void show_hash_info(HashState *hashstate, ExplainState *es); static void show_memoize_info(MemoizeState *mstate, List *ancestors, ExplainState *es); -static void show_hashagg_info(AggState *hashstate, ExplainState *es); +static void show_hashagg_info(AggState *aggstate, ExplainState *es); static void show_tidbitmap_info(BitmapHeapScanState *planstate, ExplainState *es); static void show_instrumentation_count(const char *qlabel, int which, diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index cf98d9e600..fd56066c13 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -98,7 +98,7 @@ static Oid ReindexTable(RangeVar *relation, ReindexParams *params, bool isTopLevel); static void ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind, ReindexParams *params); -static void reindex_error_callback(void *args); +static void reindex_error_callback(void *arg); static void ReindexPartitions(Oid relid, ReindexParams *params, bool isTopLevel); static void ReindexMultipleInternal(List *relids, diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c index b97b8b0435..b0747ce291 100644 --- a/src/backend/commands/lockcmds.c +++ b/src/backend/commands/lockcmds.c @@ -29,7 +29,7 @@ #include "utils/syscache.h" static void LockTableRecurse(Oid reloid, LOCKMODE lockmode, bool nowait); -static AclResult LockTableAclCheck(Oid relid, LOCKMODE lockmode, Oid userid); +static AclResult LockTableAclCheck(Oid reloid, LOCKMODE lockmode, Oid userid); static void RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid, void *arg); static void LockViewRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 7a931ab758..775553ec7b 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -52,7 +52,7 @@ static void AlterOpFamilyAdd(AlterOpFamilyStmt *stmt, Oid amoid, Oid opfamilyoid, int maxOpNumber, int maxProcNumber, - int opclassOptsProcNumber, List *items); + int optsProcNumber, List *items); static void AlterOpFamilyDrop(AlterOpFamilyStmt *stmt, Oid amoid, Oid opfamilyoid, int maxOpNumber, int maxProcNumber, diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index a583aa4304..1346104973 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -285,16 +285,16 @@ RenameSchema(const char *oldname, const char *newname) } void -AlterSchemaOwner_oid(Oid oid, Oid newOwnerId) +AlterSchemaOwner_oid(Oid schemaoid, Oid newOwnerId) { HeapTuple tup; Relation rel; rel = table_open(NamespaceRelationId, RowExclusiveLock); - tup = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(oid)); + tup = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(schemaoid)); if (!HeapTupleIsValid(tup)) - elog(ERROR, "cache lookup failed for schema %u", oid); + elog(ERROR, "cache lookup failed for schema %u", schemaoid); AlterSchemaOwner_internal(tup, rel, newOwnerId); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index e3233a8f38..6c52edd9be 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -550,7 +550,7 @@ static ObjectAddress ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, AlterTableCmd *cmd, LOCKMODE lockmode); static void RememberConstraintForRebuilding(Oid conoid, AlteredTableInfo *tab); static void RememberIndexForRebuilding(Oid indoid, AlteredTableInfo *tab); -static void RememberStatisticsForRebuilding(Oid indoid, AlteredTableInfo *tab); +static void RememberStatisticsForRebuilding(Oid stxoid, AlteredTableInfo *tab); static void ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab, LOCKMODE lockmode); static void ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId, @@ -610,7 +610,7 @@ static void ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partPa List **partexprs, Oid *partopclass, Oid *partcollation, char strategy); static void CreateInheritance(Relation child_rel, Relation parent_rel); static void RemoveInheritance(Relation child_rel, Relation parent_rel, - bool allow_detached); + bool expect_detached); static ObjectAddress ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd, AlterTableUtilityContext *context); @@ -627,7 +627,7 @@ static ObjectAddress ATExecDetachPartition(List **wqueue, AlteredTableInfo *tab, static void DetachPartitionFinalize(Relation rel, Relation partRel, bool concurrent, Oid defaultPartOid); static ObjectAddress ATExecDetachPartitionFinalize(Relation rel, RangeVar *name); -static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation rel, +static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name); static void validatePartitionedIndex(Relation partedIdx, Relation partedTbl); static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx, diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 5ad18d2de4..6f5a5262c7 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -86,8 +86,8 @@ static bool GetTupleForTrigger(EState *estate, ItemPointer tid, LockTupleMode lockmode, TupleTableSlot *oldslot, - TupleTableSlot **newSlot, - TM_FailureData *tmfpd); + TupleTableSlot **epqslot, + TM_FailureData *tmfdp); static bool TriggerEnabled(EState *estate, ResultRelInfo *relinfo, Trigger *trigger, TriggerEvent event, Bitmapset *modifiedCols, @@ -101,7 +101,7 @@ static void AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo, ResultRelInfo *src_partinfo, ResultRelInfo *dst_partinfo, int event, bool row_trigger, - TupleTableSlot *oldtup, TupleTableSlot *newtup, + TupleTableSlot *oldslot, TupleTableSlot *newslot, List *recheckIndexes, Bitmapset *modifiedCols, TransitionCaptureState *transition_capture, bool is_crosspart_update); @@ -3871,7 +3871,7 @@ static void TransitionTableAddTuple(EState *estate, Tuplestorestate *tuplestore); static void AfterTriggerFreeQuery(AfterTriggersQueryData *qs); static SetConstraintState SetConstraintStateCreate(int numalloc); -static SetConstraintState SetConstraintStateCopy(SetConstraintState state); +static SetConstraintState SetConstraintStateCopy(SetConstraintState origstate); static SetConstraintState SetConstraintStateAddItem(SetConstraintState state, Oid tgoid, bool tgisdeferred); static void cancel_prior_stmt_triggers(Oid relid, CmdType cmdType, int tgevent); diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c index c5c032a593..d39cde9cc7 100644 --- a/src/backend/lib/dshash.c +++ b/src/backend/lib/dshash.c @@ -167,7 +167,7 @@ struct dshash_table static void delete_item(dshash_table *hash_table, dshash_table_item *item); -static void resize(dshash_table *hash_table, size_t new_size); +static void resize(dshash_table *hash_table, size_t new_size_log2); static inline void ensure_valid_bucket_pointers(dshash_table *hash_table); static inline dshash_table_item *find_in_bucket(dshash_table *hash_table, const void *key, diff --git a/src/backend/lib/integerset.c b/src/backend/lib/integerset.c index 41d3abdb09..345cd1b3a5 100644 --- a/src/backend/lib/integerset.c +++ b/src/backend/lib/integerset.c @@ -264,9 +264,9 @@ static void intset_update_upper(IntegerSet *intset, int level, intset_node *child, uint64 child_key); static void intset_flush_buffered_values(IntegerSet *intset); -static int intset_binsrch_uint64(uint64 value, uint64 *arr, int arr_elems, +static int intset_binsrch_uint64(uint64 item, uint64 *arr, int arr_elems, bool nextkey); -static int intset_binsrch_leaf(uint64 value, leaf_item *arr, int arr_elems, +static int intset_binsrch_leaf(uint64 item, leaf_item *arr, int arr_elems, bool nextkey); static uint64 simple8b_encode(const uint64 *ints, int *num_encoded, uint64 base); diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 0356557387..cb702e0fde 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -62,10 +62,10 @@ static BIO_METHOD *my_BIO_s_socket(void); static int my_SSL_set_fd(Port *port, int fd); static DH *load_dh_file(char *filename, bool isServerStart); -static DH *load_dh_buffer(const char *, size_t); +static DH *load_dh_buffer(const char *buffer, size_t len); static int ssl_external_passwd_cb(char *buf, int size, int rwflag, void *userdata); static int dummy_ssl_passwd_cb(char *buf, int size, int rwflag, void *userdata); -static int verify_cb(int, X509_STORE_CTX *); +static int verify_cb(int ok, X509_STORE_CTX *ctx); static void info_cb(const SSL *ssl, int type, int args); static bool initialize_dh(SSL_CTX *context, bool isServerStart); static bool initialize_ecdh(SSL_CTX *context, bool isServerStart); diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c index 50f678a493..fd3f6894d8 100644 --- a/src/backend/optimizer/geqo/geqo_selection.c +++ b/src/backend/optimizer/geqo/geqo_selection.c @@ -42,7 +42,7 @@ #include "optimizer/geqo_random.h" #include "optimizer/geqo_selection.h" -static int linear_rand(PlannerInfo *root, int max, double bias); +static int linear_rand(PlannerInfo *root, int pool_size, double bias); /* diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index cd8a3ef7cb..ab4d8e201d 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -311,7 +311,7 @@ static ModifyTable *make_modifytable(PlannerInfo *root, Plan *subplan, List *updateColnosLists, List *withCheckOptionLists, List *returningLists, List *rowMarks, OnConflictExpr *onconflict, - List *mergeActionList, int epqParam); + List *mergeActionLists, int epqParam); static GatherMerge *create_gather_merge_plan(PlannerInfo *root, GatherMergePath *best_path); diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index c0bdc77d39..8014d1fd25 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -3086,13 +3086,13 @@ extract_rollup_sets(List *groupingSets) * gets implemented in one pass.) */ static List * -reorder_grouping_sets(List *groupingsets, List *sortclause) +reorder_grouping_sets(List *groupingSets, List *sortclause) { ListCell *lc; List *previous = NIL; List *result = NIL; - foreach(lc, groupingsets) + foreach(lc, groupingSets) { List *candidate = (List *) lfirst(lc); List *new_elems = list_difference_int(candidate, previous); diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 5012bfe142..6d5718ee4c 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -75,7 +75,8 @@ static List *build_index_tlist(PlannerInfo *root, IndexOptInfo *index, static List *get_relation_statistics(RelOptInfo *rel, Relation relation); static void set_relation_partition_info(PlannerInfo *root, RelOptInfo *rel, Relation relation); -static PartitionScheme find_partition_scheme(PlannerInfo *root, Relation rel); +static PartitionScheme find_partition_scheme(PlannerInfo *root, + Relation relation); static void set_baserel_partition_key_exprs(Relation relation, RelOptInfo *rel); static void set_baserel_partition_constraint(Relation relation, diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index c6ec694ceb..d76c0af394 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -205,8 +205,7 @@ static Node *makeXmlExpr(XmlExprOp op, char *name, List *named_args, static List *mergeTableFuncParameters(List *func_args, List *columns); static TypeName *TableFuncTypeName(List *columns); static RangeVar *makeRangeVarFromAnyName(List *names, int position, core_yyscan_t yyscanner); -static RangeVar *makeRangeVarFromQualifiedName(char *name, List *rels, - int location, +static RangeVar *makeRangeVarFromQualifiedName(char *name, List *namelist, int location, core_yyscan_t yyscanner); static void SplitColQualList(List *qualList, List **constraintList, CollateClause **collClause, diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 061d0bcc50..202a38f813 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -67,7 +67,7 @@ static ParseNamespaceItem *transformRangeSubselect(ParseState *pstate, static ParseNamespaceItem *transformRangeFunction(ParseState *pstate, RangeFunction *r); static ParseNamespaceItem *transformRangeTableFunc(ParseState *pstate, - RangeTableFunc *t); + RangeTableFunc *rtf); static TableSampleClause *transformRangeTableSample(ParseState *pstate, RangeTableSample *rts); static ParseNamespaceItem *getNSItemForSpecialRelationTypes(ParseState *pstate, diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 6d283006e3..bd068bba05 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -139,7 +139,7 @@ static void transformPartitionCmd(CreateStmtContext *cxt, PartitionCmd *cmd); static List *transformPartitionRangeBounds(ParseState *pstate, List *blist, Relation parent); static void validateInfiniteBounds(ParseState *pstate, List *blist); -static Const *transformPartitionBoundValue(ParseState *pstate, Node *con, +static Const *transformPartitionBoundValue(ParseState *pstate, Node *val, const char *colName, Oid colType, int32 colTypmod, Oid partCollation); diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c index 57c9b51814..7f74ed212f 100644 --- a/src/backend/partitioning/partbounds.c +++ b/src/backend/partitioning/partbounds.c @@ -104,7 +104,7 @@ static PartitionBoundInfo create_list_bounds(PartitionBoundSpec **boundspecs, static PartitionBoundInfo create_range_bounds(PartitionBoundSpec **boundspecs, int nparts, PartitionKey key, int **mapping); static PartitionBoundInfo merge_list_bounds(FmgrInfo *partsupfunc, - Oid *collations, + Oid *partcollation, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinType jointype, @@ -123,8 +123,8 @@ static void free_partition_map(PartitionMap *map); static bool is_dummy_partition(RelOptInfo *rel, int part_index); static int merge_matching_partitions(PartitionMap *outer_map, PartitionMap *inner_map, - int outer_part, - int inner_part, + int outer_index, + int inner_index, int *next_index); static int process_outer_partition(PartitionMap *outer_map, PartitionMap *inner_map, diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index de1184ad7b..383bc4776e 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -414,7 +414,7 @@ static void report_fork_failure_to_client(Port *port, int errnum); static CAC_state canAcceptConnections(int backend_type); static bool RandomCancelKey(int32 *cancel_key); static void signal_child(pid_t pid, int signal); -static bool SignalSomeChildren(int signal, int targets); +static bool SignalSomeChildren(int signal, int target); static void TerminateChildren(int signal); #define SignalChildren(sig) SignalSomeChildren(sig, BACKEND_TYPE_ALL) @@ -2598,9 +2598,9 @@ ConnCreate(int serverFd) * to do here. */ static void -ConnFree(Port *conn) +ConnFree(Port *port) { - free(conn); + free(port); } diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index ee05e230e0..ab97e71dd7 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -83,7 +83,7 @@ static void statext_store(Oid statOid, bool inh, MVNDistinct *ndistinct, MVDependencies *dependencies, MCVList *mcv, Datum exprs, VacAttrStats **stats); static int statext_compute_stattarget(int stattarget, - int natts, VacAttrStats **stats); + int nattrs, VacAttrStats **stats); /* Information needed to analyze a single simple expression. */ typedef struct AnlExprData @@ -99,7 +99,7 @@ static Datum serialize_expr_stats(AnlExprData *exprdata, int nexprs); static Datum expr_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull); static AnlExprData *build_expr_data(List *exprs, int stattarget); -static StatsBuildData *make_build_data(Relation onerel, StatExtEntry *stat, +static StatsBuildData *make_build_data(Relation rel, StatExtEntry *stat, int numrows, HeapTuple *rows, VacAttrStats **stats, int stattarget); diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 43fff50d49..350039cc86 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -32,7 +32,7 @@ #include "utils/memutils.h" #include "utils/tzparser.h" -static int DecodeNumber(int flen, char *field, bool haveTextMonth, +static int DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask, int *tmask, struct pg_tm *tm, fsec_t *fsec, bool *is2digits); static int DecodeNumberField(int len, char *str, @@ -281,26 +281,26 @@ static const datetkn *abbrevcache[MAXDATEFIELDS] = {NULL}; */ int -date2j(int y, int m, int d) +date2j(int year, int month, int day) { int julian; int century; - if (m > 2) + if (month > 2) { - m += 1; - y += 4800; + month += 1; + year += 4800; } else { - m += 13; - y += 4799; + month += 13; + year += 4799; } - century = y / 100; - julian = y * 365 - 32167; - julian += y / 4 - century + century / 4; - julian += 7834 * m / 256 + d; + century = year / 100; + julian = year * 365 - 32167; + julian += year / 4 - century + century / 4; + julian += 7834 * month / 256 + day; return julian; } /* date2j() */ diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index f1b632ef3c..d78002b901 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -90,7 +90,7 @@ static inline float8 line_sl(LINE *line); static inline float8 line_invsl(LINE *line); static bool line_interpt_line(Point *result, LINE *l1, LINE *l2); static bool line_contain_point(LINE *line, Point *point); -static float8 line_closept_point(Point *result, LINE *line, Point *pt); +static float8 line_closept_point(Point *result, LINE *line, Point *point); /* Routines for line segments */ static inline void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2); @@ -98,8 +98,8 @@ static inline float8 lseg_sl(LSEG *lseg); static inline float8 lseg_invsl(LSEG *lseg); static bool lseg_interpt_line(Point *result, LSEG *lseg, LINE *line); static bool lseg_interpt_lseg(Point *result, LSEG *l1, LSEG *l2); -static int lseg_crossing(float8 x, float8 y, float8 px, float8 py); -static bool lseg_contain_point(LSEG *lseg, Point *point); +static int lseg_crossing(float8 x, float8 y, float8 prev_x, float8 prev_y); +static bool lseg_contain_point(LSEG *lseg, Point *pt); static float8 lseg_closept_point(Point *result, LSEG *lseg, Point *pt); static float8 lseg_closept_line(Point *result, LSEG *lseg, LINE *line); static float8 lseg_closept_lseg(Point *result, LSEG *on_lseg, LSEG *to_lseg); @@ -115,7 +115,7 @@ static bool box_contain_point(BOX *box, Point *point); static bool box_contain_box(BOX *contains_box, BOX *contained_box); static bool box_contain_lseg(BOX *box, LSEG *lseg); static bool box_interpt_lseg(Point *result, BOX *box, LSEG *lseg); -static float8 box_closept_point(Point *result, BOX *box, Point *point); +static float8 box_closept_point(Point *result, BOX *box, Point *pt); static float8 box_closept_lseg(Point *result, BOX *box, LSEG *lseg); /* Routines for circles */ diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index 88b0000f9a..9e14922ec2 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -188,12 +188,12 @@ JsonbContainerTypeName(JsonbContainer *jbc) * Get the type name of a jsonb value. */ const char * -JsonbTypeName(JsonbValue *jbv) +JsonbTypeName(JsonbValue *val) { - switch (jbv->type) + switch (val->type) { case jbvBinary: - return JsonbContainerTypeName(jbv->val.binary.data); + return JsonbContainerTypeName(val->val.binary.data); case jbvObject: return "object"; case jbvArray: @@ -207,7 +207,7 @@ JsonbTypeName(JsonbValue *jbv) case jbvNull: return "null"; case jbvDatetime: - switch (jbv->val.datetime.typid) + switch (val->val.datetime.typid) { case DATEOID: return "date"; @@ -221,11 +221,11 @@ JsonbTypeName(JsonbValue *jbv) return "timestamp with time zone"; default: elog(ERROR, "unrecognized jsonb value datetime type: %d", - jbv->val.datetime.typid); + val->val.datetime.typid); } return "unknown"; default: - elog(ERROR, "unrecognized jsonb value type: %d", jbv->type); + elog(ERROR, "unrecognized jsonb value type: %d", val->type); return "unknown"; } } diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 60442758b3..7d6a1ed234 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -57,13 +57,13 @@ static short padBufferToInt(StringInfo buffer); static JsonbIterator *iteratorFromContainer(JsonbContainer *container, JsonbIterator *parent); static JsonbIterator *freeAndGetParent(JsonbIterator *it); static JsonbParseState *pushState(JsonbParseState **pstate); -static void appendKey(JsonbParseState *pstate, JsonbValue *scalarVal); +static void appendKey(JsonbParseState *pstate, JsonbValue *string); static void appendValue(JsonbParseState *pstate, JsonbValue *scalarVal); static void appendElement(JsonbParseState *pstate, JsonbValue *scalarVal); static int lengthCompareJsonbStringValue(const void *a, const void *b); static int lengthCompareJsonbString(const char *val1, int len1, const char *val2, int len2); -static int lengthCompareJsonbPair(const void *a, const void *b, void *arg); +static int lengthCompareJsonbPair(const void *a, const void *b, void *binequal); static void uniqueifyJsonbObject(JsonbValue *object); static JsonbValue *pushJsonbValueScalar(JsonbParseState **pstate, JsonbIteratorToken seq, @@ -1394,22 +1394,22 @@ JsonbHashScalarValueExtended(const JsonbValue *scalarVal, uint64 *hash, * Are two scalar JsonbValues of the same type a and b equal? */ static bool -equalsJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar) +equalsJsonbScalarValue(JsonbValue *a, JsonbValue *b) { - if (aScalar->type == bScalar->type) + if (a->type == b->type) { - switch (aScalar->type) + switch (a->type) { case jbvNull: return true; case jbvString: - return lengthCompareJsonbStringValue(aScalar, bScalar) == 0; + return lengthCompareJsonbStringValue(a, b) == 0; case jbvNumeric: return DatumGetBool(DirectFunctionCall2(numeric_eq, - PointerGetDatum(aScalar->val.numeric), - PointerGetDatum(bScalar->val.numeric))); + PointerGetDatum(a->val.numeric), + PointerGetDatum(b->val.numeric))); case jbvBool: - return aScalar->val.boolean == bScalar->val.boolean; + return a->val.boolean == b->val.boolean; default: elog(ERROR, "invalid jsonb scalar type"); @@ -1426,28 +1426,28 @@ equalsJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar) * operators, where a lexical sort order is generally expected. */ static int -compareJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar) +compareJsonbScalarValue(JsonbValue *a, JsonbValue *b) { - if (aScalar->type == bScalar->type) + if (a->type == b->type) { - switch (aScalar->type) + switch (a->type) { case jbvNull: return 0; case jbvString: - return varstr_cmp(aScalar->val.string.val, - aScalar->val.string.len, - bScalar->val.string.val, - bScalar->val.string.len, + return varstr_cmp(a->val.string.val, + a->val.string.len, + b->val.string.val, + b->val.string.len, DEFAULT_COLLATION_OID); case jbvNumeric: return DatumGetInt32(DirectFunctionCall2(numeric_cmp, - PointerGetDatum(aScalar->val.numeric), - PointerGetDatum(bScalar->val.numeric))); + PointerGetDatum(a->val.numeric), + PointerGetDatum(b->val.numeric))); case jbvBool: - if (aScalar->val.boolean == bScalar->val.boolean) + if (a->val.boolean == b->val.boolean) return 0; - else if (aScalar->val.boolean > bScalar->val.boolean) + else if (a->val.boolean > b->val.boolean) return 1; else return -1; @@ -1608,13 +1608,13 @@ convertJsonbValue(StringInfo buffer, JEntry *header, JsonbValue *val, int level) } static void -convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level) +convertJsonbArray(StringInfo buffer, JEntry *header, JsonbValue *val, int level) { int base_offset; int jentry_offset; int i; int totallen; - uint32 header; + uint32 containerhead; int nElems = val->val.array.nElems; /* Remember where in the buffer this array starts. */ @@ -1627,15 +1627,15 @@ convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level * Construct the header Jentry and store it in the beginning of the * variable-length payload. */ - header = nElems | JB_FARRAY; + containerhead = nElems | JB_FARRAY; if (val->val.array.rawScalar) { Assert(nElems == 1); Assert(level == 0); - header |= JB_FSCALAR; + containerhead |= JB_FSCALAR; } - appendToBuffer(buffer, (char *) &header, sizeof(uint32)); + appendToBuffer(buffer, (char *) &containerhead, sizeof(uint32)); /* Reserve space for the JEntries of the elements. */ jentry_offset = reserveFromBuffer(buffer, sizeof(JEntry) * nElems); @@ -1688,17 +1688,17 @@ convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level JENTRY_OFFLENMASK))); /* Initialize the header of this node in the container's JEntry array */ - *pheader = JENTRY_ISCONTAINER | totallen; + *header = JENTRY_ISCONTAINER | totallen; } static void -convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level) +convertJsonbObject(StringInfo buffer, JEntry *header, JsonbValue *val, int level) { int base_offset; int jentry_offset; int i; int totallen; - uint32 header; + uint32 containerheader; int nPairs = val->val.object.nPairs; /* Remember where in the buffer this object starts. */ @@ -1711,8 +1711,8 @@ convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int leve * Construct the header Jentry and store it in the beginning of the * variable-length payload. */ - header = nPairs | JB_FOBJECT; - appendToBuffer(buffer, (char *) &header, sizeof(uint32)); + containerheader = nPairs | JB_FOBJECT; + appendToBuffer(buffer, (char *) &containerheader, sizeof(uint32)); /* Reserve space for the JEntries of the keys and values. */ jentry_offset = reserveFromBuffer(buffer, sizeof(JEntry) * nPairs * 2); @@ -1804,11 +1804,11 @@ convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int leve JENTRY_OFFLENMASK))); /* Initialize the header of this node in the container's JEntry array */ - *pheader = JENTRY_ISCONTAINER | totallen; + *header = JENTRY_ISCONTAINER | totallen; } static void -convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal) +convertJsonbScalar(StringInfo buffer, JEntry *header, JsonbValue *scalarVal) { int numlen; short padlen; @@ -1816,13 +1816,13 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal) switch (scalarVal->type) { case jbvNull: - *jentry = JENTRY_ISNULL; + *header = JENTRY_ISNULL; break; case jbvString: appendToBuffer(buffer, scalarVal->val.string.val, scalarVal->val.string.len); - *jentry = scalarVal->val.string.len; + *header = scalarVal->val.string.len; break; case jbvNumeric: @@ -1831,11 +1831,11 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal) appendToBuffer(buffer, (char *) scalarVal->val.numeric, numlen); - *jentry = JENTRY_ISNUMERIC | (padlen + numlen); + *header = JENTRY_ISNUMERIC | (padlen + numlen); break; case jbvBool: - *jentry = (scalarVal->val.boolean) ? + *header = (scalarVal->val.boolean) ? JENTRY_ISBOOL_TRUE : JENTRY_ISBOOL_FALSE; break; @@ -1851,7 +1851,7 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal) len = strlen(buf); appendToBuffer(buffer, buf, len); - *jentry = len; + *header = len; } break; diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c index 9f4192e079..8d83b2edb3 100644 --- a/src/backend/utils/adt/jsonpath_exec.c +++ b/src/backend/utils/adt/jsonpath_exec.c @@ -252,7 +252,7 @@ static int JsonbType(JsonbValue *jb); static JsonbValue *getScalar(JsonbValue *scalar, enum jbvType type); static JsonbValue *wrapItemsInArray(const JsonValueList *items); static int compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2, - bool useTz, bool *have_error); + bool useTz, bool *cast_error); /****************** User interface to JsonPath executor ********************/ diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index e02fc3725a..8e671b9fab 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -33,11 +33,11 @@ static int SB_MatchText(const char *t, int tlen, const char *p, int plen, pg_locale_t locale, bool locale_is_c); -static text *SB_do_like_escape(text *, text *); +static text *SB_do_like_escape(text *pat, text *esc); static int MB_MatchText(const char *t, int tlen, const char *p, int plen, pg_locale_t locale, bool locale_is_c); -static text *MB_do_like_escape(text *, text *); +static text *MB_do_like_escape(text *pat, text *esc); static int UTF8_MatchText(const char *t, int tlen, const char *p, int plen, pg_locale_t locale, bool locale_is_c); diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 920a63b008..85ee9ec426 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -499,7 +499,7 @@ static void zero_var(NumericVar *var); static const char *set_var_from_str(const char *str, const char *cp, NumericVar *dest); -static void set_var_from_num(Numeric value, NumericVar *dest); +static void set_var_from_num(Numeric num, NumericVar *dest); static void init_var_from_num(Numeric num, NumericVar *dest); static void set_var_from_var(const NumericVar *value, NumericVar *dest); static char *get_str_from_var(const NumericVar *var); @@ -510,7 +510,7 @@ static void numericvar_deserialize(StringInfo buf, NumericVar *var); static Numeric duplicate_numeric(Numeric num); static Numeric make_result(const NumericVar *var); -static Numeric make_result_opt_error(const NumericVar *var, bool *error); +static Numeric make_result_opt_error(const NumericVar *var, bool *have_error); static void apply_typmod(NumericVar *var, int32 typmod); static void apply_typmod_special(Numeric num, int32 typmod); @@ -591,7 +591,7 @@ static void compute_bucket(Numeric operand, Numeric bound1, Numeric bound2, const NumericVar *count_var, bool reversed_bounds, NumericVar *result_var); -static void accum_sum_add(NumericSumAccum *accum, const NumericVar *var1); +static void accum_sum_add(NumericSumAccum *accum, const NumericVar *val); static void accum_sum_rescale(NumericSumAccum *accum, const NumericVar *val); static void accum_sum_carry(NumericSumAccum *accum); static void accum_sum_reset(NumericSumAccum *accum); diff --git a/src/backend/utils/adt/rangetypes.c b/src/backend/utils/adt/rangetypes.c index aa4c53e0ae..b09cb49054 100644 --- a/src/backend/utils/adt/rangetypes.c +++ b/src/backend/utils/adt/rangetypes.c @@ -55,14 +55,14 @@ typedef struct RangeIOData static RangeIOData *get_range_io_data(FunctionCallInfo fcinfo, Oid rngtypid, IOFuncSelector func); static char range_parse_flags(const char *flags_str); -static void range_parse(const char *input_str, char *flags, char **lbound_str, +static void range_parse(const char *string, char *flags, char **lbound_str, char **ubound_str); static const char *range_parse_bound(const char *string, const char *ptr, char **bound_str, bool *infinite); static char *range_deparse(char flags, const char *lbound_str, const char *ubound_str); static char *range_bound_escape(const char *value); -static Size datum_compute_size(Size sz, Datum datum, bool typbyval, +static Size datum_compute_size(Size data_length, Datum val, bool typbyval, char typalign, int16 typlen, char typstorage); static Pointer datum_write(Pointer ptr, Datum datum, bool typbyval, char typalign, int16 typlen, char typstorage); diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 51b3fdc9a0..1d503e7e01 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -196,7 +196,7 @@ static void ri_GenerateQual(StringInfo buf, Oid opoid, const char *rightop, Oid rightoptype); static void ri_GenerateQualCollation(StringInfo buf, Oid collation); -static int ri_NullCheck(TupleDesc tupdesc, TupleTableSlot *slot, +static int ri_NullCheck(TupleDesc tupDesc, TupleTableSlot *slot, const RI_ConstraintInfo *riinfo, bool rel_is_pk); static void ri_BuildQueryKey(RI_QueryKey *key, const RI_ConstraintInfo *riinfo, diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 021b760f4e..9799647e1a 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -2034,9 +2034,9 @@ time2t(const int hour, const int min, const int sec, const fsec_t fsec) } static Timestamp -dt2local(Timestamp dt, int tz) +dt2local(Timestamp dt, int timezone) { - dt -= (tz * USECS_PER_SEC); + dt -= (timezone * USECS_PER_SEC); return dt; } diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 606088cdfc..d32cb11436 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -121,7 +121,7 @@ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt); static void xml_errorHandler(void *data, xmlErrorPtr error); static void xml_ereport_by_code(int level, int sqlcode, - const char *msg, int errcode); + const char *msg, int code); static void chopStringInfoNewlines(StringInfo str); static void appendStringInfoLineSeparator(StringInfo str); diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index e7345e1410..6266568605 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -137,7 +137,7 @@ static RelMapFile pending_local_updates; /* non-export function prototypes */ static void apply_map_update(RelMapFile *map, Oid relationId, - RelFileNumber filenumber, bool add_okay); + RelFileNumber fileNumber, bool add_okay); static void merge_map_updates(RelMapFile *map, const RelMapFile *updates, bool add_okay); static void load_relmap_file(bool shared, bool lock_held); diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 96c694da8f..eb724a9d7f 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -179,7 +179,7 @@ static const char *err_gettext(const char *str) pg_attribute_format_arg(1); static pg_noinline void set_backtrace(ErrorData *edata, int num_skip); static void set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str); static void write_console(const char *line, int len); -static const char *process_log_prefix_padding(const char *p, int *padding); +static const char *process_log_prefix_padding(const char *p, int *ppadding); static void log_line_prefix(StringInfo buf, ErrorData *edata); static void send_message_to_server_log(ErrorData *edata); static void send_message_to_frontend(ErrorData *edata); diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index b11d609bbe..8c2e08fad6 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -225,7 +225,7 @@ static void reapply_stacked_values(struct config_generic *variable, Oid cursrole); static bool validate_option_array_item(const char *name, const char *value, bool skipIfNoPermissions); -static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head_p); +static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head); static void replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p, const char *name, const char *value); static bool valid_custom_variable_name(const char *name); diff --git a/src/backend/utils/misc/queryjumble.c b/src/backend/utils/misc/queryjumble.c index a67487e5fe..6e75acda27 100644 --- a/src/backend/utils/misc/queryjumble.c +++ b/src/backend/utils/misc/queryjumble.c @@ -45,7 +45,8 @@ int compute_query_id = COMPUTE_QUERY_ID_AUTO; /* True when compute_query_id is ON, or AUTO and a module requests them */ bool query_id_enabled = false; -static uint64 compute_utility_query_id(const char *str, int query_location, int query_len); +static uint64 compute_utility_query_id(const char *query_text, + int query_location, int query_len); static void AppendJumble(JumbleState *jstate, const unsigned char *item, Size size); static void JumbleQueryInternal(JumbleState *jstate, Query *query); diff --git a/src/backend/utils/sort/tuplesortvariants.c b/src/backend/utils/sort/tuplesortvariants.c index 7ad4429ad3..afa5bdbf04 100644 --- a/src/backend/utils/sort/tuplesortvariants.c +++ b/src/backend/utils/sort/tuplesortvariants.c @@ -56,7 +56,7 @@ static int comparetup_cluster(const SortTuple *a, const SortTuple *b, static void writetup_cluster(Tuplesortstate *state, LogicalTape *tape, SortTuple *stup); static void readtup_cluster(Tuplesortstate *state, SortTuple *stup, - LogicalTape *tape, unsigned int len); + LogicalTape *tape, unsigned int tuplen); static int comparetup_index_btree(const SortTuple *a, const SortTuple *b, Tuplesortstate *state); static int comparetup_index_hash(const SortTuple *a, const SortTuple *b, diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 9b504c9745..f1f2ddac17 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -680,9 +680,9 @@ FreeSnapshot(Snapshot snapshot) * with active refcount=1. Otherwise, only increment the refcount. */ void -PushActiveSnapshot(Snapshot snap) +PushActiveSnapshot(Snapshot snapshot) { - PushActiveSnapshotWithLevel(snap, GetCurrentTransactionNestLevel()); + PushActiveSnapshotWithLevel(snapshot, GetCurrentTransactionNestLevel()); } /* @@ -694,11 +694,11 @@ PushActiveSnapshot(Snapshot snap) * must not be deeper than the current top of the snapshot stack. */ void -PushActiveSnapshotWithLevel(Snapshot snap, int snap_level) +PushActiveSnapshotWithLevel(Snapshot snapshot, int snap_level) { ActiveSnapshotElt *newactive; - Assert(snap != InvalidSnapshot); + Assert(snapshot != InvalidSnapshot); Assert(ActiveSnapshot == NULL || snap_level >= ActiveSnapshot->as_level); newactive = MemoryContextAlloc(TopTransactionContext, sizeof(ActiveSnapshotElt)); @@ -707,10 +707,11 @@ PushActiveSnapshotWithLevel(Snapshot snap, int snap_level) * Checking SecondarySnapshot is probably useless here, but it seems * better to be sure. */ - if (snap == CurrentSnapshot || snap == SecondarySnapshot || !snap->copied) - newactive->as_snap = CopySnapshot(snap); + if (snapshot == CurrentSnapshot || snapshot == SecondarySnapshot || + !snapshot->copied) + newactive->as_snap = CopySnapshot(snapshot); else - newactive->as_snap = snap; + newactive->as_snap = snapshot; newactive->as_next = ActiveSnapshot; newactive->as_level = snap_level; @@ -2119,20 +2120,20 @@ HistoricSnapshotGetTupleCids(void) * SerializedSnapshotData. */ Size -EstimateSnapshotSpace(Snapshot snap) +EstimateSnapshotSpace(Snapshot snapshot) { Size size; - Assert(snap != InvalidSnapshot); - Assert(snap->snapshot_type == SNAPSHOT_MVCC); + Assert(snapshot != InvalidSnapshot); + Assert(snapshot->snapshot_type == SNAPSHOT_MVCC); /* We allocate any XID arrays needed in the same palloc block. */ size = add_size(sizeof(SerializedSnapshotData), - mul_size(snap->xcnt, sizeof(TransactionId))); - if (snap->subxcnt > 0 && - (!snap->suboverflowed || snap->takenDuringRecovery)) + mul_size(snapshot->xcnt, sizeof(TransactionId))); + if (snapshot->subxcnt > 0 && + (!snapshot->suboverflowed || snapshot->takenDuringRecovery)) size = add_size(size, - mul_size(snap->subxcnt, sizeof(TransactionId))); + mul_size(snapshot->subxcnt, sizeof(TransactionId))); return size; } diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 28f22b25b2..f61a043055 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -275,7 +275,7 @@ static char *escape_quotes_bki(const char *src); static int locale_date_order(const char *locale); static void check_locale_name(int category, const char *locale, char **canonname); -static bool check_locale_encoding(const char *locale, int encoding); +static bool check_locale_encoding(const char *locale, int user_enc); static void setlocales(void); static void usage(const char *progname); void setup_pgdata(void); diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c index fea35e4b14..9ce4b11f1e 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -197,7 +197,7 @@ static void append_btree_pattern(PatternInfoArray *pia, const char *pattern, static void compile_database_list(PGconn *conn, SimplePtrList *databases, const char *initial_dbname); static void compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations, - const DatabaseInfo *datinfo, + const DatabaseInfo *dat, uint64 *pagecount); #define log_no_match(...) do { \ diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index a7180e2955..f98ec557db 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -63,7 +63,7 @@ static DIR *get_destination_dir(char *dest_folder); static void close_destination_dir(DIR *dest_dir, char *dest_folder); static XLogRecPtr FindStreamingStart(uint32 *tli); static void StreamLog(void); -static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline, +static bool stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished); static void diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h index 8638f81f3b..1537ef47e6 100644 --- a/src/bin/pg_basebackup/streamutil.h +++ b/src/bin/pg_basebackup/streamutil.h @@ -44,7 +44,7 @@ extern bool RunIdentifySystem(PGconn *conn, char **sysid, extern void AppendPlainCommandOption(PQExpBuffer buf, bool use_new_option_syntax, - char *option_value); + char *option_name); extern void AppendStringCommandOption(PQExpBuffer buf, bool use_new_option_syntax, char *option_name, char *option_value); diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h index 0d7728d086..8ba1f2ada9 100644 --- a/src/bin/pg_basebackup/walmethods.h +++ b/src/bin/pg_basebackup/walmethods.h @@ -123,10 +123,10 @@ struct WalWriteMethod * not all those required for pg_receivewal) */ WalWriteMethod *CreateWalDirectoryMethod(const char *basedir, - pg_compress_algorithm compression_algo, - int compression, bool sync); + pg_compress_algorithm compression_algorithm, + int compression_level, bool sync); WalWriteMethod *CreateWalTarMethod(const char *tarbase, - pg_compress_algorithm compression_algo, - int compression, bool sync); + pg_compress_algorithm compression_algorithm, + int compression_level, bool sync); const char *GetLastWalMethodError(WalWriteMethod *wwmethod); diff --git a/src/bin/pg_rewind/file_ops.h b/src/bin/pg_rewind/file_ops.h index 54a853bd42..e6277c4631 100644 --- a/src/bin/pg_rewind/file_ops.h +++ b/src/bin/pg_rewind/file_ops.h @@ -17,8 +17,8 @@ extern void write_target_range(char *buf, off_t begin, size_t size); extern void close_target_file(void); extern void remove_target_file(const char *path, bool missing_ok); extern void truncate_target_file(const char *path, off_t newsize); -extern void create_target(file_entry_t *t); -extern void remove_target(file_entry_t *t); +extern void create_target(file_entry_t *entry); +extern void remove_target(file_entry_t *entry); extern void sync_target_dir(void); extern char *slurpFile(const char *datadir, const char *path, size_t *filesize); diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h index 8b4b50a33b..80c276285a 100644 --- a/src/bin/pg_rewind/pg_rewind.h +++ b/src/bin/pg_rewind/pg_rewind.h @@ -37,7 +37,7 @@ extern uint64 fetch_done; extern void extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex, XLogRecPtr endpoint, const char *restoreCommand); -extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr, +extern void findLastCheckpoint(const char *datadir, XLogRecPtr forkptr, int tliIndex, XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, XLogRecPtr *lastchkptredo, diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c index 53ea348e21..f18cf97120 100644 --- a/src/bin/pg_upgrade/info.c +++ b/src/bin/pg_upgrade/info.c @@ -23,7 +23,7 @@ static void free_db_and_rel_infos(DbInfoArr *db_arr); static void get_db_infos(ClusterInfo *cluster); static void get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo); static void free_rel_infos(RelInfoArr *rel_arr); -static void print_db_infos(DbInfoArr *dbinfo); +static void print_db_infos(DbInfoArr *db_arr); static void print_rel_infos(RelInfoArr *rel_arr); diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index 60c3c8dd68..e379aa4669 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -358,7 +358,7 @@ void generate_old_dump(void); #define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1" -bool exec_prog(const char *log_file, const char *opt_log_file, +bool exec_prog(const char *log_filename, const char *opt_log_file, bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6); void verify_directories(void); bool pid_lock_file_exists(const char *datadir); diff --git a/src/bin/pg_upgrade/relfilenumber.c b/src/bin/pg_upgrade/relfilenumber.c index c3c7402efd..c3f3d6bc0a 100644 --- a/src/bin/pg_upgrade/relfilenumber.c +++ b/src/bin/pg_upgrade/relfilenumber.c @@ -16,7 +16,7 @@ #include "pg_upgrade.h" static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace); -static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit); +static void transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit); /* diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c index 63d02719a6..2c0d285de7 100644 --- a/src/bin/pg_verifybackup/pg_verifybackup.c +++ b/src/bin/pg_verifybackup/pg_verifybackup.c @@ -134,7 +134,7 @@ static void verify_backup_file(verifier_context *context, static void report_extra_backup_files(verifier_context *context); static void verify_backup_checksums(verifier_context *context); static void verify_file_checksum(verifier_context *context, - manifest_file *m, char *pathname); + manifest_file *m, char *fullpath); static void parse_required_wal(verifier_context *context, char *pg_waldump_path, char *wal_directory, diff --git a/src/bin/pg_waldump/compat.c b/src/bin/pg_waldump/compat.c index 6a3386e970..38e0036e2d 100644 --- a/src/bin/pg_waldump/compat.c +++ b/src/bin/pg_waldump/compat.c @@ -46,19 +46,19 @@ timestamptz_to_time_t(TimestampTz t) * moved into src/common. That's a large project though. */ const char * -timestamptz_to_str(TimestampTz dt) +timestamptz_to_str(TimestampTz t) { static char buf[MAXDATELEN + 1]; char ts[MAXDATELEN + 1]; char zone[MAXDATELEN + 1]; - time_t result = (time_t) timestamptz_to_time_t(dt); + time_t result = (time_t) timestamptz_to_time_t(t); struct tm *ltime = localtime(&result); strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime); strftime(zone, sizeof(zone), "%Z", ltime); snprintf(buf, sizeof(buf), "%s.%06d %s", - ts, (int) (dt % USECS_PER_SEC), zone); + ts, (int) (t % USECS_PER_SEC), zone); return buf; } diff --git a/src/bin/pgbench/pgbench.h b/src/bin/pgbench/pgbench.h index abbdc443a6..40903bc161 100644 --- a/src/bin/pgbench/pgbench.h +++ b/src/bin/pgbench/pgbench.h @@ -158,10 +158,10 @@ extern char *expr_scanner_get_substring(PsqlScanState state, extern int expr_scanner_get_lineno(PsqlScanState state, int offset); extern void syntax_error(const char *source, int lineno, const char *line, - const char *cmd, const char *msg, - const char *more, int col) pg_attribute_noreturn(); + const char *command, const char *msg, + const char *more, int column) pg_attribute_noreturn(); -extern bool strtoint64(const char *str, bool errorOK, int64 *pi); -extern bool strtodouble(const char *str, bool errorOK, double *pd); +extern bool strtoint64(const char *str, bool errorOK, int64 *result); +extern bool strtodouble(const char *str, bool errorOK, double *dv); #endif /* PGBENCH_H */ diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h index 7872c71f58..bd051e09cb 100644 --- a/src/bin/psql/describe.h +++ b/src/bin/psql/describe.h @@ -127,16 +127,16 @@ bool describeSubscriptions(const char *pattern, bool verbose); /* \dAc */ extern bool listOperatorClasses(const char *access_method_pattern, - const char *opclass_pattern, + const char *type_pattern, bool verbose); /* \dAf */ extern bool listOperatorFamilies(const char *access_method_pattern, - const char *opclass_pattern, + const char *type_pattern, bool verbose); /* \dAo */ -extern bool listOpFamilyOperators(const char *accessMethod_pattern, +extern bool listOpFamilyOperators(const char *access_method_pattern, const char *family_pattern, bool verbose); /* \dAp */ diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h index 84a1be72fa..9d91ad87c6 100644 --- a/src/bin/scripts/common.h +++ b/src/bin/scripts/common.h @@ -18,7 +18,7 @@ extern void splitTableColumnsSpec(const char *spec, int encoding, char **table, const char **columns); -extern void appendQualifiedRelation(PQExpBuffer buf, const char *name, +extern void appendQualifiedRelation(PQExpBuffer buf, const char *spec, PGconn *conn, bool echo); extern bool yesno_prompt(const char *question); diff --git a/src/fe_utils/cancel.c b/src/fe_utils/cancel.c index 8d9ea19de2..32195cb706 100644 --- a/src/fe_utils/cancel.c +++ b/src/fe_utils/cancel.c @@ -183,9 +183,9 @@ handle_sigint(SIGNAL_ARGS) * Register query cancellation callback for SIGINT. */ void -setup_cancel_handler(void (*callback) (void)) +setup_cancel_handler(void (*query_cancel_callback) (void)) { - cancel_callback = callback; + cancel_callback = query_cancel_callback; cancel_sent_msg = _("Cancel request sent\n"); cancel_not_sent_msg = _("Could not send cancel request: "); diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index 49d4ad560f..89f5b01b31 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -34,8 +34,8 @@ extern PGDLLIMPORT int numattr; extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn(); -extern void closerel(char *name); -extern void boot_openrel(char *name); +extern void closerel(char *relname); +extern void boot_openrel(char *relname); extern void DefineAttr(char *name, char *type, int attnum, int nullness); extern void InsertOneTuple(void); diff --git a/src/include/commands/alter.h b/src/include/commands/alter.h index 52f5e6f6d2..fddfa3b850 100644 --- a/src/include/commands/alter.h +++ b/src/include/commands/alter.h @@ -29,7 +29,7 @@ extern Oid AlterObjectNamespace_oid(Oid classId, Oid objid, Oid nspOid, ObjectAddresses *objsMoved); extern ObjectAddress ExecAlterOwnerStmt(AlterOwnerStmt *stmt); -extern void AlterObjectOwner_internal(Relation catalog, Oid objectId, +extern void AlterObjectOwner_internal(Relation rel, Oid objectId, Oid new_ownerId); #endif /* ALTER_H */ diff --git a/src/include/commands/conversioncmds.h b/src/include/commands/conversioncmds.h index ab736fb626..da31365272 100644 --- a/src/include/commands/conversioncmds.h +++ b/src/include/commands/conversioncmds.h @@ -18,6 +18,6 @@ #include "catalog/objectaddress.h" #include "nodes/parsenodes.h" -extern ObjectAddress CreateConversionCommand(CreateConversionStmt *parsetree); +extern ObjectAddress CreateConversionCommand(CreateConversionStmt *stmt); #endif /* CONVERSIONCMDS_H */ diff --git a/src/include/commands/matview.h b/src/include/commands/matview.h index a067da39d2..7fbb2564ae 100644 --- a/src/include/commands/matview.h +++ b/src/include/commands/matview.h @@ -26,7 +26,7 @@ extern void SetMatViewPopulatedState(Relation relation, bool newstate); extern ObjectAddress ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, ParamListInfo params, QueryCompletion *qc); -extern DestReceiver *CreateTransientRelDestReceiver(Oid oid); +extern DestReceiver *CreateTransientRelDestReceiver(Oid transientoid); extern bool MatViewIncrementalMaintenanceIsEnabled(void); diff --git a/src/include/commands/policy.h b/src/include/commands/policy.h index c5f3753da2..f05bb66c61 100644 --- a/src/include/commands/policy.h +++ b/src/include/commands/policy.h @@ -23,7 +23,7 @@ extern void RelationBuildRowSecurity(Relation relation); extern void RemovePolicyById(Oid policy_id); -extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid objid); +extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id); extern ObjectAddress CreatePolicy(CreatePolicyStmt *stmt); extern ObjectAddress AlterPolicy(AlterPolicyStmt *stmt); diff --git a/src/include/commands/publicationcmds.h b/src/include/commands/publicationcmds.h index 57df3fc1e3..2491196570 100644 --- a/src/include/commands/publicationcmds.h +++ b/src/include/commands/publicationcmds.h @@ -29,7 +29,7 @@ extern void RemovePublicationRelById(Oid proid); extern void RemovePublicationSchemaById(Oid psoid); extern ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId); -extern void AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId); +extern void AlterPublicationOwner_oid(Oid subid, Oid newOwnerId); extern void InvalidatePublicationRels(List *relids); extern bool pub_rf_contains_invalid_column(Oid pubid, Relation relation, List *ancestors, bool pubviaroot); diff --git a/src/include/commands/schemacmds.h b/src/include/commands/schemacmds.h index 8c21f2a2c9..e6eb2aaa60 100644 --- a/src/include/commands/schemacmds.h +++ b/src/include/commands/schemacmds.h @@ -18,12 +18,12 @@ #include "catalog/objectaddress.h" #include "nodes/parsenodes.h" -extern Oid CreateSchemaCommand(CreateSchemaStmt *parsetree, +extern Oid CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, int stmt_location, int stmt_len); extern ObjectAddress RenameSchema(const char *oldname, const char *newname); extern ObjectAddress AlterSchemaOwner(const char *name, Oid newOwnerId); -extern void AlterSchemaOwner_oid(Oid schemaOid, Oid newOwnerId); +extern void AlterSchemaOwner_oid(Oid schemaoid, Oid newOwnerId); #endif /* SCHEMACMDS_H */ diff --git a/src/include/commands/seclabel.h b/src/include/commands/seclabel.h index 1577988f1d..d8dec99651 100644 --- a/src/include/commands/seclabel.h +++ b/src/include/commands/seclabel.h @@ -28,7 +28,7 @@ extern ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt); typedef void (*check_object_relabel_type) (const ObjectAddress *object, const char *seclabel); -extern void register_label_provider(const char *provider, +extern void register_label_provider(const char *provider_name, check_object_relabel_type hook); #endif /* SECLABEL_H */ diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index d38c0e2388..b3b04ccfa9 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -55,16 +55,16 @@ extern int64 nextval_internal(Oid relid, bool check_permissions); extern Datum nextval(PG_FUNCTION_ARGS); extern List *sequence_options(Oid relid); -extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *stmt); +extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *seq); extern ObjectAddress AlterSequence(ParseState *pstate, AlterSeqStmt *stmt); extern void SequenceChangePersistence(Oid relid, char newrelpersistence); extern void DeleteSequenceTuple(Oid relid); extern void ResetSequence(Oid seq_relid); extern void ResetSequenceCaches(void); -extern void seq_redo(XLogReaderState *rptr); -extern void seq_desc(StringInfo buf, XLogReaderState *rptr); +extern void seq_redo(XLogReaderState *record); +extern void seq_desc(StringInfo buf, XLogReaderState *record); extern const char *seq_identify(uint8 info); -extern void seq_mask(char *pagedata, BlockNumber blkno); +extern void seq_mask(char *page, BlockNumber blkno); #endif /* SEQUENCE_H */ diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h index 0c48654b96..03f14d6be1 100644 --- a/src/include/commands/tablecmds.h +++ b/src/include/commands/tablecmds.h @@ -66,7 +66,7 @@ extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass); extern bool CheckRelationTableSpaceMove(Relation rel, Oid newTableSpaceId); extern void SetRelationTableSpace(Relation rel, Oid newTableSpaceId, - RelFileNumber newRelFileNumber); + RelFileNumber newRelFilenumber); extern ObjectAddress renameatt(RenameStmt *stmt); diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index 1f80907112..a11c9e9473 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -62,8 +62,8 @@ extern char *get_tablespace_name(Oid spc_oid); extern bool directory_is_empty(const char *path); extern void remove_tablespace_symlink(const char *linkloc); -extern void tblspc_redo(XLogReaderState *rptr); -extern void tblspc_desc(StringInfo buf, XLogReaderState *rptr); +extern void tblspc_redo(XLogReaderState *record); +extern void tblspc_desc(StringInfo buf, XLogReaderState *record); extern const char *tblspc_identify(uint8 info); #endif /* TABLESPACE_H */ diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index b7b6bd6008..b0a928bbe8 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -166,7 +166,7 @@ extern void TriggerSetParentTrigger(Relation trigRel, Oid parentTrigId, Oid childTableId); extern void RemoveTriggerById(Oid trigOid); -extern Oid get_trigger_oid(Oid relid, const char *name, bool missing_ok); +extern Oid get_trigger_oid(Oid relid, const char *trigname, bool missing_ok); extern ObjectAddress renametrig(RenameStmt *stmt); @@ -231,22 +231,22 @@ extern bool ExecBRUpdateTriggers(EState *estate, ResultRelInfo *relinfo, ItemPointer tupleid, HeapTuple fdw_trigtuple, - TupleTableSlot *slot, - TM_FailureData *tmfdp); + TupleTableSlot *newslot, + TM_FailureData *tmfd); extern void ExecARUpdateTriggers(EState *estate, ResultRelInfo *relinfo, ResultRelInfo *src_partinfo, ResultRelInfo *dst_partinfo, ItemPointer tupleid, HeapTuple fdw_trigtuple, - TupleTableSlot *slot, + TupleTableSlot *newslot, List *recheckIndexes, TransitionCaptureState *transition_capture, bool is_crosspart_update); extern bool ExecIRUpdateTriggers(EState *estate, ResultRelInfo *relinfo, HeapTuple trigtuple, - TupleTableSlot *slot); + TupleTableSlot *newslot); extern void ExecBSTruncateTriggers(EState *estate, ResultRelInfo *relinfo); extern void ExecASTruncateTriggers(EState *estate, @@ -267,9 +267,9 @@ extern bool AfterTriggerPendingOnRel(Oid relid); * in utils/adt/ri_triggers.c */ extern bool RI_FKey_pk_upd_check_required(Trigger *trigger, Relation pk_rel, - TupleTableSlot *old_slot, TupleTableSlot *new_slot); + TupleTableSlot *oldslot, TupleTableSlot *newslot); extern bool RI_FKey_fk_upd_check_required(Trigger *trigger, Relation fk_rel, - TupleTableSlot *old_slot, TupleTableSlot *new_slot); + TupleTableSlot *oldslot, TupleTableSlot *newslot); extern bool RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel); extern void RI_PartitionRemove_Check(Trigger *trigger, Relation fk_rel, diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h index a17bedb851..532bc49c38 100644 --- a/src/include/commands/typecmds.h +++ b/src/include/commands/typecmds.h @@ -34,7 +34,7 @@ extern Oid AssignTypeMultirangeArrayOid(void); extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw); extern ObjectAddress AlterDomainNotNull(List *names, bool notNull); -extern ObjectAddress AlterDomainAddConstraint(List *names, Node *constr, +extern ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint, ObjectAddress *constrAddr); extern ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName); extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName, diff --git a/src/include/common/fe_memutils.h b/src/include/common/fe_memutils.h index 63f2b6a802..a1751b370d 100644 --- a/src/include/common/fe_memutils.h +++ b/src/include/common/fe_memutils.h @@ -26,8 +26,8 @@ extern char *pg_strdup(const char *in); extern void *pg_malloc(size_t size); extern void *pg_malloc0(size_t size); extern void *pg_malloc_extended(size_t size, int flags); -extern void *pg_realloc(void *pointer, size_t size); -extern void pg_free(void *pointer); +extern void *pg_realloc(void *ptr, size_t size); +extern void pg_free(void *ptr); /* * Variants with easier notation and more type safety diff --git a/src/include/common/kwlookup.h b/src/include/common/kwlookup.h index 48d7f08b83..8384e33a5a 100644 --- a/src/include/common/kwlookup.h +++ b/src/include/common/kwlookup.h @@ -32,7 +32,7 @@ typedef struct ScanKeywordList } ScanKeywordList; -extern int ScanKeywordLookup(const char *text, const ScanKeywordList *keywords); +extern int ScanKeywordLookup(const char *str, const ScanKeywordList *keywords); /* Code that wants to retrieve the text of the N'th keyword should use this. */ static inline const char * diff --git a/src/include/common/scram-common.h b/src/include/common/scram-common.h index d1f840c11c..e1f5e786e0 100644 --- a/src/include/common/scram-common.h +++ b/src/include/common/scram-common.h @@ -49,7 +49,7 @@ extern int scram_SaltedPassword(const char *password, const char *salt, int saltlen, int iterations, uint8 *result, const char **errstr); -extern int scram_H(const uint8 *str, int len, uint8 *result, +extern int scram_H(const uint8 *input, int len, uint8 *result, const char **errstr); extern int scram_ClientKey(const uint8 *salted_password, uint8 *result, const char **errstr); diff --git a/src/include/fe_utils/cancel.h b/src/include/fe_utils/cancel.h index 3b84daf6eb..c256b04f4f 100644 --- a/src/include/fe_utils/cancel.h +++ b/src/include/fe_utils/cancel.h @@ -27,6 +27,6 @@ extern void ResetCancelConn(void); * A callback can be optionally set up to be called at cancellation * time. */ -extern void setup_cancel_handler(void (*cancel_callback) (void)); +extern void setup_cancel_handler(void (*query_cancel_callback) (void)); #endif /* CANCEL_H */ diff --git a/src/include/fe_utils/mbprint.h b/src/include/fe_utils/mbprint.h index 5dd2181787..6bcd9e0783 100644 --- a/src/include/fe_utils/mbprint.h +++ b/src/include/fe_utils/mbprint.h @@ -24,6 +24,7 @@ extern int pg_wcswidth(const char *pwcs, size_t len, int encoding); extern void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding, struct lineptr *lines, int count); extern void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding, - int *width, int *height, int *format_size); + int *result_width, int *result_height, + int *result_format_size); #endif /* MBPRINT_H */ diff --git a/src/include/fe_utils/parallel_slot.h b/src/include/fe_utils/parallel_slot.h index 8ce63c9373..199df9bb00 100644 --- a/src/include/fe_utils/parallel_slot.h +++ b/src/include/fe_utils/parallel_slot.h @@ -58,7 +58,7 @@ ParallelSlotClearHandler(ParallelSlot *slot) slot->handler_context = NULL; } -extern ParallelSlot *ParallelSlotsGetIdle(ParallelSlotArray *slots, +extern ParallelSlot *ParallelSlotsGetIdle(ParallelSlotArray *sa, const char *dbname); extern ParallelSlotArray *ParallelSlotsSetup(int numslots, ConnParams *cparams, diff --git a/src/include/fe_utils/recovery_gen.h b/src/include/fe_utils/recovery_gen.h index 83e181a225..934952f31d 100644 --- a/src/include/fe_utils/recovery_gen.h +++ b/src/include/fe_utils/recovery_gen.h @@ -21,7 +21,7 @@ #define MINIMUM_VERSION_FOR_RECOVERY_GUC 120000 extern PQExpBuffer GenerateRecoveryConfig(PGconn *pgconn, - char *pg_replication_slot); + char *replication_slot); extern void WriteRecoveryConfig(PGconn *pgconn, char *target_dir, PQExpBuffer contents); diff --git a/src/include/fe_utils/simple_list.h b/src/include/fe_utils/simple_list.h index 9261a7b0a4..757fd6ac5a 100644 --- a/src/include/fe_utils/simple_list.h +++ b/src/include/fe_utils/simple_list.h @@ -65,6 +65,6 @@ extern void simple_string_list_destroy(SimpleStringList *list); extern const char *simple_string_list_not_touched(SimpleStringList *list); -extern void simple_ptr_list_append(SimplePtrList *list, void *val); +extern void simple_ptr_list_append(SimplePtrList *list, void *ptr); #endif /* SIMPLE_LIST_H */ diff --git a/src/include/fe_utils/string_utils.h b/src/include/fe_utils/string_utils.h index fa4deb2497..0927cb19b9 100644 --- a/src/include/fe_utils/string_utils.h +++ b/src/include/fe_utils/string_utils.h @@ -24,7 +24,7 @@ extern PGDLLIMPORT int quote_all_identifiers; extern PQExpBuffer (*getLocalPQExpBuffer) (void); /* Functions */ -extern const char *fmtId(const char *identifier); +extern const char *fmtId(const char *rawid); extern const char *fmtQualifiedId(const char *schema, const char *id); extern char *formatPGVersionNumber(int version_number, bool include_minor, diff --git a/src/include/foreign/foreign.h b/src/include/foreign/foreign.h index 75538110fc..ac82125530 100644 --- a/src/include/foreign/foreign.h +++ b/src/include/foreign/foreign.h @@ -67,12 +67,13 @@ typedef struct ForeignTable extern ForeignServer *GetForeignServer(Oid serverid); extern ForeignServer *GetForeignServerExtended(Oid serverid, bits16 flags); -extern ForeignServer *GetForeignServerByName(const char *name, bool missing_ok); +extern ForeignServer *GetForeignServerByName(const char *srvname, + bool missing_ok); extern UserMapping *GetUserMapping(Oid userid, Oid serverid); extern ForeignDataWrapper *GetForeignDataWrapper(Oid fdwid); extern ForeignDataWrapper *GetForeignDataWrapperExtended(Oid fdwid, bits16 flags); -extern ForeignDataWrapper *GetForeignDataWrapperByName(const char *name, +extern ForeignDataWrapper *GetForeignDataWrapperByName(const char *fdwname, bool missing_ok); extern ForeignTable *GetForeignTable(Oid relid); diff --git a/src/include/funcapi.h b/src/include/funcapi.h index dc3d819a1c..10dbe3981e 100644 --- a/src/include/funcapi.h +++ b/src/include/funcapi.h @@ -348,7 +348,7 @@ extern void end_MultiFuncCall(PG_FUNCTION_ARGS, FuncCallContext *funcctx); * "VARIADIC NULL". */ extern int extract_variadic_args(FunctionCallInfo fcinfo, int variadic_start, - bool convert_unknown, Datum **values, + bool convert_unknown, Datum **args, Oid **types, bool **nulls); #endif /* FUNCAPI_H */ diff --git a/src/include/libpq/pqmq.h b/src/include/libpq/pqmq.h index 6687c8f4ce..0d7b43d830 100644 --- a/src/include/libpq/pqmq.h +++ b/src/include/libpq/pqmq.h @@ -19,6 +19,6 @@ extern void pq_redirect_to_shm_mq(dsm_segment *seg, shm_mq_handle *mqh); extern void pq_set_parallel_leader(pid_t pid, BackendId backend_id); -extern void pq_parse_errornotice(StringInfo str, ErrorData *edata); +extern void pq_parse_errornotice(StringInfo msg, ErrorData *edata); #endif /* PQMQ_H */ diff --git a/src/include/nodes/extensible.h b/src/include/nodes/extensible.h index 34936db894..820b904841 100644 --- a/src/include/nodes/extensible.h +++ b/src/include/nodes/extensible.h @@ -72,8 +72,8 @@ typedef struct ExtensibleNodeMethods void (*nodeRead) (struct ExtensibleNode *node); } ExtensibleNodeMethods; -extern void RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *method); -extern const ExtensibleNodeMethods *GetExtensibleNodeMethods(const char *name, +extern void RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *methods); +extern const ExtensibleNodeMethods *GetExtensibleNodeMethods(const char *extnodename, bool missing_ok); /* diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index cdd6debfa0..a80f43e540 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -218,7 +218,7 @@ extern int16 *readAttrNumberCols(int numCols); /* * nodes/copyfuncs.c */ -extern void *copyObjectImpl(const void *obj); +extern void *copyObjectImpl(const void *from); /* cast result back to argument type, if supported by compiler */ #ifdef HAVE_TYPEOF diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h index de2dd907e1..543543d686 100644 --- a/src/include/nodes/params.h +++ b/src/include/nodes/params.h @@ -163,8 +163,8 @@ extern ParamListInfo copyParamList(ParamListInfo from); extern Size EstimateParamListSpace(ParamListInfo paramLI); extern void SerializeParamList(ParamListInfo paramLI, char **start_address); extern ParamListInfo RestoreParamList(char **start_address); -extern char *BuildParamLogString(ParamListInfo params, char **paramTextValues, - int valueLen); +extern char *BuildParamLogString(ParamListInfo params, char **knownTextValues, + int maxlen); extern void ParamsErrorCallback(void *arg); #endif /* PARAMS_H */ diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index a6e04d04a3..dc991626ba 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -619,9 +619,9 @@ extern void list_deduplicate_oid(List *list); extern void list_free(List *list); extern void list_free_deep(List *list); -extern pg_nodiscard List *list_copy(const List *list); +extern pg_nodiscard List *list_copy(const List *oldlist); extern pg_nodiscard List *list_copy_head(const List *oldlist, int len); -extern pg_nodiscard List *list_copy_tail(const List *list, int nskip); +extern pg_nodiscard List *list_copy_tail(const List *oldlist, int nskip); extern pg_nodiscard List *list_copy_deep(const List *oldlist); typedef int (*list_sort_comparator) (const ListCell *a, const ListCell *b); diff --git a/src/include/nodes/value.h b/src/include/nodes/value.h index 5e83b843dc..91878e8b98 100644 --- a/src/include/nodes/value.h +++ b/src/include/nodes/value.h @@ -83,7 +83,7 @@ typedef struct BitString extern Integer *makeInteger(int i); extern Float *makeFloat(char *numericStr); -extern Boolean *makeBoolean(bool var); +extern Boolean *makeBoolean(bool val); extern String *makeString(char *str); extern BitString *makeBitString(char *str); diff --git a/src/include/optimizer/appendinfo.h b/src/include/optimizer/appendinfo.h index 5e80a741a4..28568fab57 100644 --- a/src/include/optimizer/appendinfo.h +++ b/src/include/optimizer/appendinfo.h @@ -40,7 +40,7 @@ extern void get_translated_update_targetlist(PlannerInfo *root, Index relid, List **update_colnos); extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root, Relids relids, int *nappinfos); -extern void add_row_identity_var(PlannerInfo *root, Var *rowid_var, +extern void add_row_identity_var(PlannerInfo *root, Var *orig_var, Index rtindex, const char *rowid_name); extern void add_row_identity_columns(PlannerInfo *root, Index rtindex, RangeTblEntry *target_rte, diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index 6c5203dc44..ff242d1b6d 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -40,8 +40,8 @@ extern bool contain_leaked_vars(Node *clause); extern Relids find_nonnullable_rels(Node *clause); extern List *find_nonnullable_vars(Node *clause); -extern List *find_forced_null_vars(Node *clause); -extern Var *find_forced_null_var(Node *clause); +extern List *find_forced_null_vars(Node *node); +extern Var *find_forced_null_var(Node *node); extern bool is_pseudo_constant_clause(Node *clause); extern bool is_pseudo_constant_clause_relids(Node *clause, Relids relids); diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 9e91da7114..f27d11eaa9 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -117,7 +117,7 @@ extern void cost_incremental_sort(Path *path, double limit_tuples); extern Cost cost_sort_estimate(PlannerInfo *root, List *pathkeys, int nPresortedKeys, double tuples); -extern void cost_append(AppendPath *path, PlannerInfo *root); +extern void cost_append(AppendPath *apath, PlannerInfo *root); extern void cost_merge_append(Path *path, PlannerInfo *root, List *pathkeys, int n_streams, Cost input_startup_cost, Cost input_total_cost, @@ -169,7 +169,7 @@ extern void final_cost_hashjoin(PlannerInfo *root, HashPath *path, JoinCostWorkspace *workspace, JoinPathExtraData *extra); extern void cost_gather(GatherPath *path, PlannerInfo *root, - RelOptInfo *baserel, ParamPathInfo *param_info, double *rows); + RelOptInfo *rel, ParamPathInfo *param_info, double *rows); extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root, RelOptInfo *rel, ParamPathInfo *param_info, Cost input_startup_cost, Cost input_total_cost, diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index d11cdac7f8..881386997c 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -170,8 +170,8 @@ extern void add_child_rel_equivalences(PlannerInfo *root, extern void add_child_join_rel_equivalences(PlannerInfo *root, int nappinfos, AppendRelInfo **appinfos, - RelOptInfo *parent_rel, - RelOptInfo *child_rel); + RelOptInfo *parent_joinrel, + RelOptInfo *child_joinrel); extern List *generate_implied_equalities_for_column(PlannerInfo *root, RelOptInfo *rel, ec_matches_callback_type callback, diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index 1566f435b3..9dffdcfd1e 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -115,6 +115,6 @@ extern Plan *set_plan_references(PlannerInfo *root, Plan *plan); extern bool trivial_subqueryscan(SubqueryScan *plan); extern void record_plan_function_dependency(PlannerInfo *root, Oid funcid); extern void record_plan_type_dependency(PlannerInfo *root, Oid typid); -extern bool extract_query_dependencies_walker(Node *node, PlannerInfo *root); +extern bool extract_query_dependencies_walker(Node *node, PlannerInfo *context); #endif /* PLANMAIN_H */ diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index 2b11ff1d1f..5b4f350b33 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -45,7 +45,7 @@ extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex); * prototypes for prepagg.c */ extern void get_agg_clause_costs(PlannerInfo *root, AggSplit aggsplit, - AggClauseCosts *agg_costs); + AggClauseCosts *costs); extern void preprocess_aggrefs(PlannerInfo *root, Node *clause); /* diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index dc379547c7..3d3a5918c2 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -43,7 +43,7 @@ extern List *transformInsertRow(ParseState *pstate, List *exprlist, List *stmtcols, List *icolumns, List *attrnos, bool strip_indirection); extern List *transformUpdateTargetList(ParseState *pstate, - List *targetList); + List *origTlist); extern Query *transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree); extern Query *transformStmt(ParseState *pstate, Node *parseTree); diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h index c56822f645..0856af5b43 100644 --- a/src/include/parser/parse_agg.h +++ b/src/include/parser/parse_agg.h @@ -19,7 +19,7 @@ extern void transformAggregateCall(ParseState *pstate, Aggref *agg, List *args, List *aggorder, bool agg_distinct); -extern Node *transformGroupingFunc(ParseState *pstate, GroupingFunc *g); +extern Node *transformGroupingFunc(ParseState *pstate, GroupingFunc *p); extern void transformWindowFuncCall(ParseState *pstate, WindowFunc *wfunc, WindowDef *windef); diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index e15b622904..7a57b199bf 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -29,8 +29,8 @@ extern Oid LookupOperWithArgs(ObjectWithArgs *oper, bool noError); /* Routines to find operators matching a name and given input types */ /* NB: the selected operator may require coercion of the input types! */ -extern Operator oper(ParseState *pstate, List *op, Oid arg1, Oid arg2, - bool noError, int location); +extern Operator oper(ParseState *pstate, List *opname, Oid ltypeId, + Oid rtypeId, bool noError, int location); extern Operator left_oper(ParseState *pstate, List *op, Oid arg, bool noError, int location); diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index de21c3c649..484db165db 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -88,7 +88,7 @@ extern ParseNamespaceItem *addRangeTableEntryForJoin(ParseState *pstate, List *aliasvars, List *leftcols, List *rightcols, - Alias *joinalias, + Alias *join_using_alias, Alias *alias, bool inFromCl); extern ParseNamespaceItem *addRangeTableEntryForCTE(ParseState *pstate, diff --git a/src/include/partitioning/partbounds.h b/src/include/partitioning/partbounds.h index b1e3f1b840..1f5b706d83 100644 --- a/src/include/partitioning/partbounds.h +++ b/src/include/partitioning/partbounds.h @@ -98,7 +98,7 @@ typedef struct PartitionBoundInfoData #define partition_bound_accepts_nulls(bi) ((bi)->null_index != -1) #define partition_bound_has_default(bi) ((bi)->default_index != -1) -extern int get_hash_partition_greatest_modulus(PartitionBoundInfo b); +extern int get_hash_partition_greatest_modulus(PartitionBoundInfo bound); extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc, Oid *partcollation, Datum *values, bool *isnull); @@ -125,7 +125,7 @@ extern void check_new_partition_bound(char *relname, Relation parent, PartitionBoundSpec *spec, ParseState *pstate); extern void check_default_partition_contents(Relation parent, - Relation defaultRel, + Relation default_rel, PartitionBoundSpec *new_spec); extern int32 partition_rbound_datum_cmp(FmgrInfo *partsupfunc, diff --git a/src/include/pgstat.h b/src/include/pgstat.h index ac28f813b4..ad7334a0d2 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -417,7 +417,7 @@ extern long pgstat_report_stat(bool force); extern void pgstat_force_next_flush(void); extern void pgstat_reset_counters(void); -extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objectid); +extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objoid); extern void pgstat_reset_of_kind(PgStat_Kind kind); /* stats accessors */ @@ -474,7 +474,7 @@ extern void pgstat_report_connect(Oid dboid); #define pgstat_count_conn_txn_idle_time(n) \ (pgStatTransactionIdleTime += (n)) -extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dbid); +extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dboid); /* * Functions in pgstat_function.c @@ -489,7 +489,7 @@ extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo, extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize); -extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid funcid); +extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid func_id); extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id); @@ -499,7 +499,7 @@ extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id); extern void pgstat_create_relation(Relation rel); extern void pgstat_drop_relation(Relation rel); -extern void pgstat_copy_relation_stats(Relation dstrel, Relation srcrel); +extern void pgstat_copy_relation_stats(Relation dst, Relation src); extern void pgstat_init_relation(Relation rel); extern void pgstat_assoc_relation(Relation rel); @@ -571,7 +571,7 @@ extern void pgstat_twophase_postabort(TransactionId xid, uint16 info, extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry(Oid relid); extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry_ext(bool shared, - Oid relid); + Oid reloid); extern PgStat_TableStatus *find_tabstat_entry(Oid rel_id); diff --git a/src/include/pgtime.h b/src/include/pgtime.h index 1c44be8baa..9ee5906001 100644 --- a/src/include/pgtime.h +++ b/src/include/pgtime.h @@ -75,8 +75,8 @@ extern bool pg_tz_acceptable(pg_tz *tz); /* these functions are in strftime.c */ -extern size_t pg_strftime(char *s, size_t max, const char *format, - const struct pg_tm *tm); +extern size_t pg_strftime(char *s, size_t maxsize, const char *format, + const struct pg_tm *t); /* these functions and variables are in pgtz.c */ diff --git a/src/include/port.h b/src/include/port.h index fe48618df7..3562d471b5 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -46,14 +46,14 @@ extern bool pg_set_block(pgsocket sock); /* Portable path handling for Unix/Win32 (in path.c) */ -extern bool has_drive_prefix(const char *filename); +extern bool has_drive_prefix(const char *path); extern char *first_dir_separator(const char *filename); extern char *last_dir_separator(const char *filename); extern char *first_path_var_separator(const char *pathlist); extern void join_path_components(char *ret_path, const char *head, const char *tail); extern void canonicalize_path(char *path); -extern void make_native_path(char *path); +extern void make_native_path(char *filename); extern void cleanup_path(char *path); extern bool path_contains_parent_reference(const char *path); extern bool path_is_relative_and_below_cwd(const char *path); @@ -439,7 +439,7 @@ extern void qsort_arg(void *base, size_t nel, size_t elsize, extern void qsort_interruptible(void *base, size_t nel, size_t elsize, qsort_arg_comparator cmp, void *arg); -extern void *bsearch_arg(const void *key, const void *base, +extern void *bsearch_arg(const void *key, const void *base0, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), void *arg); @@ -479,7 +479,7 @@ extern pqsigfunc pqsignal(int signo, pqsigfunc func); extern char *escape_single_quotes_ascii(const char *src); /* common/wait_error.c */ -extern char *wait_result_to_str(int exit_status); +extern char *wait_result_to_str(int exitstatus); extern bool wait_result_is_signal(int exit_status, int signum); extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_found); diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index 96975bdc92..271b946167 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -121,7 +121,7 @@ extern bool RegisterDynamicBackgroundWorker(BackgroundWorker *worker, /* Query the status of a bgworker */ extern BgwHandleStatus GetBackgroundWorkerPid(BackgroundWorkerHandle *handle, pid_t *pidp); -extern BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pid); +extern BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp); extern BgwHandleStatus WaitForBackgroundWorkerShutdown(BackgroundWorkerHandle *); extern const char *GetBackgroundWorkerTypeByPid(pid_t pid); diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index 6436724f3d..d4c33c844f 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -84,7 +84,7 @@ extern PGDLLIMPORT HANDLE syslogPipe[2]; extern int SysLogger_Start(void); -extern void write_syslogger_file(const char *buffer, int count, int dest); +extern void write_syslogger_file(const char *buffer, int count, int destination); #ifdef EXEC_BACKEND extern void SysLoggerMain(int argc, char *argv[]) pg_attribute_noreturn(); diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index 98b9b3a288..f001ca41bb 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -42,7 +42,7 @@ typedef enum ReplaceVarsNoMatchOption extern void OffsetVarNodes(Node *node, int offset, int sublevels_up); -extern void ChangeVarNodes(Node *node, int old_varno, int new_varno, +extern void ChangeVarNodes(Node *node, int rt_index, int new_index, int sublevels_up); extern void IncrementVarSublevelsUp(Node *node, int delta_sublevels_up, int min_sublevels_up); diff --git a/src/include/snowball/libstemmer/header.h b/src/include/snowball/libstemmer/header.h index bf172d5b9b..ef5a546406 100644 --- a/src/include/snowball/libstemmer/header.h +++ b/src/include/snowball/libstemmer/header.h @@ -45,7 +45,7 @@ extern int eq_v_b(struct SN_env * z, const symbol * p); extern int find_among(struct SN_env * z, const struct among * v, int v_size); extern int find_among_b(struct SN_env * z, const struct among * v, int v_size); -extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjustment); +extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjptr); extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s); extern int slice_from_v(struct SN_env * z, const symbol * p); extern int slice_del(struct SN_env * z); diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h index 71f852c157..906919d88e 100644 --- a/src/include/statistics/extended_stats_internal.h +++ b/src/include/statistics/extended_stats_internal.h @@ -79,7 +79,7 @@ extern MVDependencies *statext_dependencies_deserialize(bytea *data); extern MCVList *statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget); -extern bytea *statext_mcv_serialize(MCVList *mcv, VacAttrStats **stats); +extern bytea *statext_mcv_serialize(MCVList *mcvlist, VacAttrStats **stats); extern MCVList *statext_mcv_deserialize(bytea *data); extern MultiSortSupport multi_sort_init(int ndims); diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h index bb7ef1240e..0351927a21 100644 --- a/src/include/statistics/statistics.h +++ b/src/include/statistics/statistics.h @@ -102,8 +102,8 @@ extern void BuildRelationExtStatistics(Relation onerel, bool inh, double totalro int numrows, HeapTuple *rows, int natts, VacAttrStats **vacattrstats); extern int ComputeExtStatisticsRows(Relation onerel, - int natts, VacAttrStats **stats); -extern bool statext_is_kind_built(HeapTuple htup, char kind); + int natts, VacAttrStats **vacattrstats); +extern bool statext_is_kind_built(HeapTuple htup, char type); extern Selectivity dependencies_clauselist_selectivity(PlannerInfo *root, List *clauses, int varRelid, diff --git a/src/include/tcop/cmdtag.h b/src/include/tcop/cmdtag.h index b9e8992a49..60e3179c74 100644 --- a/src/include/tcop/cmdtag.h +++ b/src/include/tcop/cmdtag.h @@ -53,6 +53,6 @@ extern const char *GetCommandTagName(CommandTag commandTag); extern bool command_tag_display_rowcount(CommandTag commandTag); extern bool command_tag_event_trigger_ok(CommandTag commandTag); extern bool command_tag_table_rewrite_ok(CommandTag commandTag); -extern CommandTag GetCommandTagEnum(const char *tagname); +extern CommandTag GetCommandTagEnum(const char *commandname); #endif /* CMDTAG_H */ diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index c36c711dae..fd73b38440 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -32,8 +32,8 @@ typedef struct TSVectorParseStateData *TSVectorParseState; extern TSVectorParseState init_tsvector_parser(char *input, int flags); extern void reset_tsvector_parser(TSVectorParseState state, char *input); extern bool gettoken_tsvector(TSVectorParseState state, - char **token, int *len, - WordEntryPos **pos, int *poslen, + char **strval, int *lenval, + WordEntryPos **pos_ptr, int *poslen, char **endptr); extern void close_tsvector_parser(TSVectorParseState state); diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index 3d6411197c..9a4df3a5da 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -214,8 +214,8 @@ extern bool is_member_of_role_nosuper(Oid member, Oid role); extern bool is_admin_of_role(Oid member, Oid role); extern Oid select_best_admin(Oid member, Oid role); extern void check_is_member_of_role(Oid member, Oid role); -extern Oid get_role_oid(const char *rolename, bool missing_ok); -extern Oid get_role_oid_or_public(const char *rolename); +extern Oid get_role_oid(const char *rolname, bool missing_ok); +extern Oid get_role_oid_or_public(const char *rolname); extern Oid get_rolespec_oid(const RoleSpec *role, bool missing_ok); extern void check_rolespec_name(const RoleSpec *role, const char *detail_msg); extern HeapTuple get_rolespec_tuple(const RoleSpec *role); @@ -285,7 +285,7 @@ extern AclResult pg_parameter_acl_aclcheck(Oid acl_oid, Oid roleid, AclMode mode); extern AclResult pg_proc_aclcheck(Oid proc_oid, Oid roleid, AclMode mode); extern AclResult pg_language_aclcheck(Oid lang_oid, Oid roleid, AclMode mode); -extern AclResult pg_largeobject_aclcheck_snapshot(Oid lang_oid, Oid roleid, +extern AclResult pg_largeobject_aclcheck_snapshot(Oid lobj_oid, Oid roleid, AclMode mode, Snapshot snapshot); extern AclResult pg_namespace_aclcheck(Oid nsp_oid, Oid roleid, AclMode mode); extern AclResult pg_tablespace_aclcheck(Oid spc_oid, Oid roleid, AclMode mode); diff --git a/src/include/utils/attoptcache.h b/src/include/utils/attoptcache.h index ee37af9500..49ae647216 100644 --- a/src/include/utils/attoptcache.h +++ b/src/include/utils/attoptcache.h @@ -23,6 +23,6 @@ typedef struct AttributeOpts float8 n_distinct_inherited; } AttributeOpts; -extern AttributeOpts *get_attribute_options(Oid spcid, int attnum); +extern AttributeOpts *get_attribute_options(Oid attrelid, int attnum); #endif /* ATTOPTCACHE_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 221c3e6c3d..81631f1645 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -47,10 +47,10 @@ extern int16 pg_strtoint16(const char *s); extern int32 pg_strtoint32(const char *s); extern int64 pg_strtoint64(const char *s); extern int pg_itoa(int16 i, char *a); -extern int pg_ultoa_n(uint32 l, char *a); -extern int pg_ulltoa_n(uint64 l, char *a); -extern int pg_ltoa(int32 l, char *a); -extern int pg_lltoa(int64 ll, char *a); +extern int pg_ultoa_n(uint32 value, char *a); +extern int pg_ulltoa_n(uint64 value, char *a); +extern int pg_ltoa(int32 value, char *a); +extern int pg_lltoa(int64 value, char *a); extern char *pg_ultostr_zeropad(char *str, uint32 value, int32 minwidth); extern char *pg_ultostr(char *str, uint32 value); diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index 4527e82517..2cae346beb 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -327,7 +327,7 @@ extern int DecodeTimezoneAbbrev(int field, char *lowtoken, extern int DecodeSpecial(int field, char *lowtoken, int *val); extern int DecodeUnits(int field, char *lowtoken, int *val); -extern int j2day(int jd); +extern int j2day(int date); extern Node *TemporalSimplify(int32 max_precis, Node *node); diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index 4cbe6edf21..b03c17d73b 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -379,13 +379,13 @@ typedef struct JsonbIterator extern uint32 getJsonbOffset(const JsonbContainer *jc, int index); extern uint32 getJsonbLength(const JsonbContainer *jc, int index); extern int compareJsonbContainers(JsonbContainer *a, JsonbContainer *b); -extern JsonbValue *findJsonbValueFromContainer(JsonbContainer *sheader, +extern JsonbValue *findJsonbValueFromContainer(JsonbContainer *container, uint32 flags, JsonbValue *key); extern JsonbValue *getKeyJsonValueFromContainer(JsonbContainer *container, const char *keyVal, int keyLen, JsonbValue *res); -extern JsonbValue *getIthJsonbValueFromContainer(JsonbContainer *sheader, +extern JsonbValue *getIthJsonbValueFromContainer(JsonbContainer *container, uint32 i); extern JsonbValue *pushJsonbValue(JsonbParseState **pstate, JsonbIteratorToken seq, JsonbValue *jbval); @@ -406,7 +406,7 @@ extern char *JsonbToCString(StringInfo out, JsonbContainer *in, extern char *JsonbToCStringIndent(StringInfo out, JsonbContainer *in, int estimated_len); extern bool JsonbExtractScalar(JsonbContainer *jbc, JsonbValue *res); -extern const char *JsonbTypeName(JsonbValue *jb); +extern const char *JsonbTypeName(JsonbValue *val); extern Datum jsonb_set_element(Jsonb *jb, Datum *path, int path_len, JsonbValue *newval); diff --git a/src/include/utils/multirangetypes.h b/src/include/utils/multirangetypes.h index 915330f990..bc3339205b 100644 --- a/src/include/utils/multirangetypes.h +++ b/src/include/utils/multirangetypes.h @@ -64,7 +64,7 @@ extern bool multirange_ne_internal(TypeCacheEntry *rangetyp, const MultirangeType *mr2); extern bool multirange_contains_elem_internal(TypeCacheEntry *rangetyp, const MultirangeType *mr, - Datum elem); + Datum val); extern bool multirange_contains_range_internal(TypeCacheEntry *rangetyp, const MultirangeType *mr, const RangeType *r); @@ -115,11 +115,11 @@ extern MultirangeType *multirange_intersect_internal(Oid mltrngtypoid, extern TypeCacheEntry *multirange_get_typcache(FunctionCallInfo fcinfo, Oid mltrngtypid); extern void multirange_deserialize(TypeCacheEntry *rangetyp, - const MultirangeType *range, + const MultirangeType *multirange, int32 *range_count, RangeType ***ranges); extern MultirangeType *make_multirange(Oid mltrngtypoid, - TypeCacheEntry *typcache, + TypeCacheEntry *rangetyp, int32 range_count, RangeType **ranges); extern MultirangeType *make_empty_multirange(Oid mltrngtypoid, TypeCacheEntry *rangetyp); diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h index 3caa74dfe7..09d355e818 100644 --- a/src/include/utils/numeric.h +++ b/src/include/utils/numeric.h @@ -85,6 +85,6 @@ extern Numeric numeric_div_opt_error(Numeric num1, Numeric num2, bool *have_error); extern Numeric numeric_mod_opt_error(Numeric num1, Numeric num2, bool *have_error); -extern int32 numeric_int4_opt_error(Numeric num, bool *error); +extern int32 numeric_int4_opt_error(Numeric num, bool *have_error); #endif /* _PG_NUMERIC_H_ */ diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h index 901d2041d6..40a3602855 100644 --- a/src/include/utils/pgstat_internal.h +++ b/src/include/utils/pgstat_internal.h @@ -567,7 +567,7 @@ extern void pgstat_relation_delete_pending_cb(PgStat_EntryRef *entry_ref); */ extern void pgstat_replslot_reset_timestamp_cb(PgStatShared_Common *header, TimestampTz ts); -extern void pgstat_replslot_to_serialized_name_cb(const PgStatShared_Common *tmp, NameData *name); +extern void pgstat_replslot_to_serialized_name_cb(const PgStatShared_Common *header, NameData *name); extern bool pgstat_replslot_from_serialized_name_cb(const NameData *name, PgStat_HashKey *key); @@ -579,7 +579,7 @@ extern void pgstat_attach_shmem(void); extern void pgstat_detach_shmem(void); extern PgStat_EntryRef *pgstat_get_entry_ref(PgStat_Kind kind, Oid dboid, Oid objoid, - bool create, bool *found); + bool create, bool *created_entry); extern bool pgstat_lock_entry(PgStat_EntryRef *entry_ref, bool nowait); extern bool pgstat_lock_entry_shared(PgStat_EntryRef *entry_ref, bool nowait); extern void pgstat_unlock_entry(PgStat_EntryRef *entry_ref); diff --git a/src/include/utils/rangetypes.h b/src/include/utils/rangetypes.h index 993fad4fc2..b62f1ea481 100644 --- a/src/include/utils/rangetypes.h +++ b/src/include/utils/rangetypes.h @@ -141,8 +141,8 @@ extern int range_cmp_bounds(TypeCacheEntry *typcache, const RangeBound *b1, extern int range_cmp_bound_values(TypeCacheEntry *typcache, const RangeBound *b1, const RangeBound *b2); extern int range_compare(const void *key1, const void *key2, void *arg); -extern bool bounds_adjacent(TypeCacheEntry *typcache, RangeBound bound1, - RangeBound bound2); +extern bool bounds_adjacent(TypeCacheEntry *typcache, RangeBound boundA, + RangeBound boundB); extern RangeType *make_empty_range(TypeCacheEntry *typcache); extern bool range_split_internal(TypeCacheEntry *typcache, const RangeType *r1, const RangeType *r2, RangeType **output1, diff --git a/src/include/utils/regproc.h b/src/include/utils/regproc.h index a36ceba7ad..0e2965ff93 100644 --- a/src/include/utils/regproc.h +++ b/src/include/utils/regproc.h @@ -28,7 +28,7 @@ extern char *format_operator_extended(Oid operator_oid, bits16 flags); extern List *stringToQualifiedNameList(const char *string); extern char *format_procedure(Oid procedure_oid); extern char *format_procedure_qualified(Oid procedure_oid); -extern void format_procedure_parts(Oid operator_oid, List **objnames, +extern void format_procedure_parts(Oid procedure_oid, List **objnames, List **objargs, bool missing_ok); extern char *format_operator(Oid operator_oid); diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index ba35d6b3b3..73106b6fc0 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -50,7 +50,7 @@ extern Oid RelationGetReplicaIndex(Relation relation); extern List *RelationGetIndexExpressions(Relation relation); extern List *RelationGetDummyIndexExpressions(Relation relation); extern List *RelationGetIndexPredicate(Relation relation); -extern Datum *RelationGetIndexRawAttOptions(Relation relation); +extern Datum *RelationGetIndexRawAttOptions(Relation indexrel); extern bytea **RelationGetIndexAttOptions(Relation relation, bool copy); typedef enum IndexAttrBitmapKind diff --git a/src/include/utils/relmapper.h b/src/include/utils/relmapper.h index 2bb2e255fd..92f1f779a4 100644 --- a/src/include/utils/relmapper.h +++ b/src/include/utils/relmapper.h @@ -37,7 +37,7 @@ typedef struct xl_relmap_update extern RelFileNumber RelationMapOidToFilenumber(Oid relationId, bool shared); -extern Oid RelationMapFilenumberToOid(RelFileNumber relationId, bool shared); +extern Oid RelationMapFilenumberToOid(RelFileNumber filenumber, bool shared); extern RelFileNumber RelationMapOidToFilenumberForDatabase(char *dbpath, Oid relationId); extern void RelationMapCopy(Oid dbid, Oid tsid, char *srcdbpath, diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index d485b9bfcd..49af4ed2ed 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -181,11 +181,11 @@ extern double ineq_histogram_selectivity(PlannerInfo *root, Oid collation, Datum constval, Oid consttype); extern double var_eq_const(VariableStatData *vardata, - Oid oproid, Oid collation, + Oid operator, Oid collation, Datum constval, bool constisnull, bool varonleft, bool negate); extern double var_eq_non_const(VariableStatData *vardata, - Oid oproid, Oid collation, + Oid operator, Oid collation, Node *other, bool varonleft, bool negate); diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h index 06eafdf118..9f4dd5360a 100644 --- a/src/include/utils/snapmgr.h +++ b/src/include/utils/snapmgr.h @@ -169,7 +169,7 @@ extern bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); /* Support for catalog timetravel for logical decoding */ struct HTAB; extern struct HTAB *HistoricSnapshotGetTupleCids(void); -extern void SetupHistoricSnapshot(Snapshot snapshot_now, struct HTAB *tuplecids); +extern void SetupHistoricSnapshot(Snapshot historic_snapshot, struct HTAB *tuplecids); extern void TeardownHistoricSnapshot(bool is_error); extern bool HistoricSnapshotActive(void); diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index edf3a97318..820c08941c 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -83,10 +83,10 @@ extern pg_time_t timestamptz_to_time_t(TimestampTz t); extern const char *timestamptz_to_str(TimestampTz t); -extern int tm2timestamp(struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *dt); +extern int tm2timestamp(struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *result); extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, const char **tzn, pg_tz *attimezone); -extern void dt2time(Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec); +extern void dt2time(Timestamp jd, int *hour, int *min, int *sec, fsec_t *fsec); extern void interval2itm(Interval span, struct pg_itm *itm); extern int itm2interval(struct pg_itm *itm, Interval *span); diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index e82b5a638d..4441274990 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -372,7 +372,7 @@ extern const char *tuplesort_space_type_name(TuplesortSpaceType t); extern int tuplesort_merge_order(int64 allowedMem); -extern Size tuplesort_estimate_shared(int nworkers); +extern Size tuplesort_estimate_shared(int nWorkers); extern void tuplesort_initialize_shared(Sharedsort *shared, int nWorkers, dsm_segment *seg); extern void tuplesort_attach_shared(Sharedsort *shared, dsm_segment *seg); diff --git a/src/include/utils/xml.h b/src/include/utils/xml.h index 6620a62619..bfd0abf9c1 100644 --- a/src/include/utils/xml.h +++ b/src/include/utils/xml.h @@ -64,7 +64,7 @@ extern xmltype *xmlconcat(List *args); extern xmltype *xmlelement(XmlExpr *xexpr, Datum *named_argvalue, bool *named_argnull, Datum *argvalue, bool *argnull); -extern xmltype *xmlparse(text *data, XmlOptionType xmloption, bool preserve_whitespace); +extern xmltype *xmlparse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace); extern xmltype *xmlpi(const char *target, text *arg, bool arg_is_null, bool *result_is_null); extern xmltype *xmlroot(xmltype *data, text *version, int standalone); extern bool xml_is_document(xmltype *arg); diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 917b19e0e9..746e9b4f1e 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -381,7 +381,7 @@ static void closePGconn(PGconn *conn); static void release_conn_addrinfo(PGconn *conn); static void sendTerminateConn(PGconn *conn); static PQconninfoOption *conninfo_init(PQExpBuffer errorMessage); -static PQconninfoOption *parse_connection_string(const char *conninfo, +static PQconninfoOption *parse_connection_string(const char *connstr, PQExpBuffer errorMessage, bool use_defaults); static int uri_prefix_length(const char *connstr); static bool recognized_connection_string(const char *connstr); diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index bb874f7f50..97f6894244 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -2808,12 +2808,12 @@ PQgetCopyData(PGconn *conn, char **buffer, int async) * PQgetline - gets a newline-terminated string from the backend. * * Chiefly here so that applications can use "COPY to stdout" - * and read the output string. Returns a null-terminated string in s. + * and read the output string. Returns a null-terminated string in `buffer`. * * XXX this routine is now deprecated, because it can't handle binary data. * If called during a COPY BINARY we return EOF. * - * PQgetline reads up to maxlen-1 characters (like fgets(3)) but strips + * PQgetline reads up to `length`-1 characters (like fgets(3)) but strips * the terminating \n (like gets(3)). * * CAUTION: the caller is responsible for detecting the end-of-copy signal @@ -2824,23 +2824,23 @@ PQgetCopyData(PGconn *conn, char **buffer, int async) * 0 if EOL is reached (i.e., \n has been read) * (this is required for backward-compatibility -- this * routine used to always return EOF or 0, assuming that - * the line ended within maxlen bytes.) + * the line ended within `length` bytes.) * 1 in other cases (i.e., the buffer was filled before \n is reached) */ int -PQgetline(PGconn *conn, char *s, int maxlen) +PQgetline(PGconn *conn, char *buffer, int length) { - if (!s || maxlen <= 0) + if (!buffer || length <= 0) return EOF; - *s = '\0'; - /* maxlen must be at least 3 to hold the \. terminator! */ - if (maxlen < 3) + *buffer = '\0'; + /* length must be at least 3 to hold the \. terminator! */ + if (length < 3) return EOF; if (!conn) return EOF; - return pqGetline3(conn, s, maxlen); + return pqGetline3(conn, buffer, length); } /* @@ -2892,9 +2892,9 @@ PQgetlineAsync(PGconn *conn, char *buffer, int bufsize) * send failure. */ int -PQputline(PGconn *conn, const char *s) +PQputline(PGconn *conn, const char *string) { - return PQputnbytes(conn, s, strlen(s)); + return PQputnbytes(conn, string, strlen(string)); } /* diff --git a/src/interfaces/libpq/fe-secure-common.h b/src/interfaces/libpq/fe-secure-common.h index d18db7138c..415a93898f 100644 --- a/src/interfaces/libpq/fe-secure-common.h +++ b/src/interfaces/libpq/fe-secure-common.h @@ -22,8 +22,8 @@ extern int pq_verify_peer_name_matches_certificate_name(PGconn *conn, const char *namedata, size_t namelen, char **store_name); extern int pq_verify_peer_name_matches_certificate_ip(PGconn *conn, - const unsigned char *addrdata, - size_t addrlen, + const unsigned char *ipdata, + size_t iplen, char **store_name); extern bool pq_verify_peer_name_matches_certificate(PGconn *conn); diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 3798bb3f11..aea4661736 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -68,14 +68,14 @@ static int verify_cb(int ok, X509_STORE_CTX *ctx); static int openssl_verify_peer_name_matches_certificate_name(PGconn *conn, - ASN1_STRING *name, + ASN1_STRING *name_entry, char **store_name); static int openssl_verify_peer_name_matches_certificate_ip(PGconn *conn, ASN1_OCTET_STRING *addr_entry, char **store_name); static void destroy_ssl_system(void); static int initialize_SSL(PGconn *conn); -static PostgresPollingStatusType open_client_SSL(PGconn *); +static PostgresPollingStatusType open_client_SSL(PGconn *conn); static char *SSLerrmessage(unsigned long ecode); static void SSLerrfree(char *buf); static int PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata); diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h index 7986445f1a..b7df3224c0 100644 --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/interfaces/libpq/libpq-fe.h @@ -483,7 +483,7 @@ extern int PQputCopyEnd(PGconn *conn, const char *errormsg); extern int PQgetCopyData(PGconn *conn, char **buffer, int async); /* Deprecated routines for copy in/out */ -extern int PQgetline(PGconn *conn, char *string, int length); +extern int PQgetline(PGconn *conn, char *buffer, int length); extern int PQputline(PGconn *conn, const char *string); extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize); extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); @@ -591,7 +591,7 @@ extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_lengt extern void PQprint(FILE *fout, /* output stream */ const PGresult *res, - const PQprintOpt *ps); /* option structure */ + const PQprintOpt *po); /* option structure */ /* * really old printing routines diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 7bd2a9fff1..a647342948 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -374,7 +374,7 @@ static ParamListInfo setup_param_list(PLpgSQL_execstate *estate, PLpgSQL_expr *expr); static ParamExternData *plpgsql_param_fetch(ParamListInfo params, int paramid, bool speculative, - ParamExternData *workspace); + ParamExternData *prm); static void plpgsql_param_compile(ParamListInfo params, Param *param, ExprState *state, Datum *resv, bool *resnull);