From: Peter Geoghegan Date: Wed, 22 Apr 2026 16:47:19 +0000 (-0400) Subject: Harmonize function parameter names for Postgres 19. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d14f69a32a17924d93838491bc8e78a1a9b46807;p=thirdparty%2Fpostgresql.git Harmonize function parameter names for Postgres 19. Make sure that function declarations use names that exactly match the corresponding names from function definitions in a few places. Most of these inconsistencies were introduced during Postgres 19 development. This commit was written with help from clang-tidy, by mechanically applying the same rules as similar clean-up commits (the earliest such commit was commit 035ce1fe). --- diff --git a/contrib/jsonb_plperl/jsonb_plperl.c b/contrib/jsonb_plperl/jsonb_plperl.c index 67e5e1940d0..f8e4a584fdd 100644 --- a/contrib/jsonb_plperl/jsonb_plperl.c +++ b/contrib/jsonb_plperl/jsonb_plperl.c @@ -13,7 +13,7 @@ PG_MODULE_MAGIC_EXT( ); static SV *Jsonb_to_SV(JsonbContainer *jsonb); -static void SV_to_JsonbValue(SV *obj, JsonbInState *ps, bool is_elem); +static void SV_to_JsonbValue(SV *in, JsonbInState *jsonb_state, bool is_elem); static SV * diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h index b97f18b1aac..b379585233b 100644 --- a/contrib/sepgsql/sepgsql.h +++ b/contrib/sepgsql/sepgsql.h @@ -274,7 +274,7 @@ extern void sepgsql_object_relabel(const ObjectAddress *object, /* * dml.c */ -extern bool sepgsql_dml_privileges(List *rangeTabls, List *rteperminfos, +extern bool sepgsql_dml_privileges(List *rangeTbls, List *rteperminfos, bool abort_on_violation); /* diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 74c355be219..fdddd23035b 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -205,7 +205,7 @@ static void prune_freeze_setup(PruneFreezeParams *params, PruneState *prstate); static void heap_page_fix_vm_corruption(PruneState *prstate, OffsetNumber offnum, - VMCorruptionType ctype); + VMCorruptionType corruption_type); static void prune_freeze_fast_path(PruneState *prstate, PruneFreezeResult *presult); static void prune_freeze_plan(PruneState *prstate, diff --git a/src/backend/commands/propgraphcmds.c b/src/backend/commands/propgraphcmds.c index 45d2ff1bbba..bea74b71b63 100644 --- a/src/backend/commands/propgraphcmds.c +++ b/src/backend/commands/propgraphcmds.c @@ -73,7 +73,7 @@ struct element_info }; -static ArrayType *propgraph_element_get_key(ParseState *pstate, const List *keycols, Relation element_rel, +static ArrayType *propgraph_element_get_key(ParseState *pstate, const List *key_clause, Relation element_rel, const char *aliasname, int location); static void propgraph_edge_get_ref_keys(ParseState *pstate, const List *keycols, const List *refcols, Relation edge_rel, Relation ref_rel, diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c index 4a9dc7b164d..bafdca80810 100644 --- a/src/backend/commands/repack.c +++ b/src/backend/commands/repack.c @@ -180,7 +180,7 @@ static void adjust_toast_pointers(Relation relation, TupleTableSlot *dest, TupleTableSlot *src); static bool find_target_tuple(Relation rel, ChangeContext *chgcxt, TupleTableSlot *locator, - TupleTableSlot *received); + TupleTableSlot *retrieved); static void process_concurrent_changes(XLogRecPtr end_of_wal, ChangeContext *chgcxt, bool done); diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 2d1b19d1f53..ff4e1388c55 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -184,7 +184,7 @@ static void doNegateFloat(Float *v); static Node *makeAndExpr(Node *lexpr, Node *rexpr, int location); static Node *makeOrExpr(Node *lexpr, Node *rexpr, int location); static Node *makeNotExpr(Node *expr, int location); -static Node *makeAArrayExpr(List *elements, int location, int end_location); +static Node *makeAArrayExpr(List *elements, int location, int location_end); static Node *makeSQLValueFunction(SQLValueFunctionOp op, int32 typmod, int location); static Node *makeXmlExpr(XmlExprOp op, char *name, List *named_args, diff --git a/src/backend/replication/logical/conflict.c b/src/backend/replication/logical/conflict.c index 2887dfb7150..48ef84ee924 100644 --- a/src/backend/replication/logical/conflict.c +++ b/src/backend/replication/logical/conflict.c @@ -47,9 +47,9 @@ static void errdetail_apply_conflict(EState *estate, TimestampTz localts, StringInfo err_msg); static void get_tuple_desc(EState *estate, ResultRelInfo *relinfo, ConflictType type, char **key_desc, - TupleTableSlot *searchslot, char **search_desc, TupleTableSlot *localslot, char **local_desc, TupleTableSlot *remoteslot, char **remote_desc, + TupleTableSlot *searchslot, char **search_desc, Oid indexoid); static char *build_index_value_desc(EState *estate, Relation localrel, TupleTableSlot *slot, Oid indexoid); diff --git a/src/backend/replication/pgrepack/pgrepack.c b/src/backend/replication/pgrepack/pgrepack.c index 4da66aa0f44..eb9a883d7a9 100644 --- a/src/backend/replication/pgrepack/pgrepack.c +++ b/src/backend/replication/pgrepack/pgrepack.c @@ -27,7 +27,7 @@ static void repack_begin_txn(LogicalDecodingContext *ctx, static void repack_commit_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, XLogRecPtr commit_lsn); static void repack_process_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, - Relation rel, ReorderBufferChange *change); + Relation relation, ReorderBufferChange *change); static void repack_store_change(LogicalDecodingContext *ctx, Relation relation, ConcurrentChangeKind kind, HeapTuple tuple); diff --git a/src/backend/rewrite/rewriteGraphTable.c b/src/backend/rewrite/rewriteGraphTable.c index 7b64818e369..3519ea3beae 100644 --- a/src/backend/rewrite/rewriteGraphTable.c +++ b/src/backend/rewrite/rewriteGraphTable.c @@ -92,7 +92,7 @@ struct path_element static Node *replace_property_refs(Oid propgraphid, Node *node, const List *mappings); static List *build_edge_vertex_link_quals(HeapTuple edgetup, int edgerti, int refrti, Oid refid, AttrNumber catalog_key_attnum, AttrNumber catalog_ref_attnum, AttrNumber catalog_eqop_attnum); static List *generate_queries_for_path_pattern(RangeTblEntry *rte, List *path_pattern); -static Query *generate_query_for_graph_path(RangeTblEntry *rte, List *path); +static Query *generate_query_for_graph_path(RangeTblEntry *rte, List *graph_path); static Node *generate_setop_from_pathqueries(List *pathqueries, List **rtable, List **targetlist); static List *generate_queries_for_path_pattern_recurse(RangeTblEntry *rte, List *pathqueries, List *cur_path, List *path_elem_lists, int elempos); static Query *generate_query_for_empty_path_pattern(RangeTblEntry *rte); diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 1fee559b7c6..1878efb4aa9 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -685,7 +685,7 @@ static inline int BufferLockDisownInternal(Buffer buffer, BufferDesc *buf_hdr); static inline bool BufferLockAttempt(BufferDesc *buf_hdr, BufferLockMode mode); static void BufferLockQueueSelf(BufferDesc *buf_hdr, BufferLockMode mode); static void BufferLockDequeueSelf(BufferDesc *buf_hdr); -static void BufferLockWakeup(BufferDesc *buf_hdr, bool unlocked); +static void BufferLockWakeup(BufferDesc *buf_hdr, bool wake_exclusive); static void BufferLockProcessRelease(BufferDesc *buf_hdr, BufferLockMode mode, uint64 lockstate); static inline uint64 BufferLockReleaseSub(BufferLockMode mode); diff --git a/src/bin/pg_upgrade/multixact_read_v18.h b/src/bin/pg_upgrade/multixact_read_v18.h index 0721041eeee..88b52b9d2e8 100644 --- a/src/bin/pg_upgrade/multixact_read_v18.h +++ b/src/bin/pg_upgrade/multixact_read_v18.h @@ -32,6 +32,6 @@ extern OldMultiXactReader *AllocOldMultiXactRead(char *pgdata, extern bool GetOldMultiXactIdSingleMember(OldMultiXactReader *state, MultiXactId multi, MultiXactMember *member); -extern void FreeOldMultiXactReader(OldMultiXactReader *reader); +extern void FreeOldMultiXactReader(OldMultiXactReader *state); #endif /* MULTIXACT_READ_V18_H */ diff --git a/src/include/commands/repack.h b/src/include/commands/repack.h index fd16e74b179..45e5440a311 100644 --- a/src/include/commands/repack.h +++ b/src/include/commands/repack.h @@ -40,7 +40,7 @@ extern PGDLLIMPORT volatile sig_atomic_t RepackMessagePending; extern void ExecRepack(ParseState *pstate, RepackStmt *stmt, bool isTopLevel); -extern void cluster_rel(RepackCommand command, Relation OldHeap, Oid indexOid, +extern void cluster_rel(RepackCommand cmd, Relation OldHeap, Oid indexOid, ClusterParams *params, bool isTopLevel); extern void check_index_is_clusterable(Relation OldHeap, Oid indexOid, LOCKMODE lockmode); diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 6980c6dceda..33bbdbfeffb 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -758,7 +758,7 @@ extern void ExecCloseIndices(ResultRelInfo *resultRelInfo); #define EIIT_NO_DUPE_ERROR (1<<1) #define EIIT_ONLY_SUMMARIZING (1<<2) extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, EState *estate, - uint32 options, TupleTableSlot *slot, + uint32 flags, TupleTableSlot *slot, List *arbiterIndexes, bool *specConflict); extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo, diff --git a/src/include/postmaster/datachecksum_state.h b/src/include/postmaster/datachecksum_state.h index 7acb3b43ab8..2a1ae10d55d 100644 --- a/src/include/postmaster/datachecksum_state.h +++ b/src/include/postmaster/datachecksum_state.h @@ -37,7 +37,7 @@ typedef enum } DataChecksumsWorkerResult; /* Prototypes for data checksum state manipulation */ -bool AbsorbDataChecksumsBarrier(ProcSignalBarrierType target_state); +bool AbsorbDataChecksumsBarrier(ProcSignalBarrierType barrier); void EmitAndWaitDataChecksumsBarrier(uint32 state); /* Prototypes for data checksum background worker */ diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h index 24e22f9cafa..b42b5862a70 100644 --- a/src/include/replication/syncrep.h +++ b/src/include/replication/syncrep.h @@ -100,7 +100,7 @@ union YYSTYPE; typedef void *yyscan_t; extern int syncrep_yyparse(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner); extern int syncrep_yylex(union YYSTYPE *yylval_param, char **syncrep_parse_error_msg_p, yyscan_t yyscanner); -extern void syncrep_yyerror(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner, const char *str); +extern void syncrep_yyerror(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse_error_msg_p, yyscan_t yyscanner, const char *message); extern void syncrep_scanner_init(const char *str, yyscan_t *yyscannerp); extern void syncrep_scanner_finish(yyscan_t yyscanner); diff --git a/src/include/tsearch/ts_locale.h b/src/include/tsearch/ts_locale.h index 6e2d67ee4a5..f4edf300c2b 100644 --- a/src/include/tsearch/ts_locale.h +++ b/src/include/tsearch/ts_locale.h @@ -56,7 +56,7 @@ ts_copychar_cstr(void *dest, const void *src) #define COPYCHAR ts_copychar_cstr #define GENERATE_T_ISCLASS_DECL(character_class) \ -extern int t_is##character_class##_with_len(const char *ptr, int len); \ +extern int t_is##character_class##_with_len(const char *ptr, int mblen); \ extern int t_is##character_class##_cstr(const char *ptr); \ extern int t_is##character_class##_unbounded(const char *ptr); \ \ diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 06ebffa111c..c1f9b8932a3 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -248,7 +248,7 @@ static plperl_call_data *current_call_data = NULL; **********************************************************************/ static PerlInterpreter *plperl_init_interp(void); -static void plperl_destroy_interp(PerlInterpreter **); +static void plperl_destroy_interp(PerlInterpreter **interp); static void plperl_fini(int code, Datum arg); static void set_interp_require(bool trusted); @@ -284,12 +284,14 @@ static Datum plperl_hash_to_datum(SV *src, TupleDesc td); static void plperl_init_shared_libs(pTHX); static void plperl_trusted_init(void); static void plperl_untrusted_init(void); -static HV *plperl_spi_execute_fetch_result(SPITupleTable *, uint64, int); +static HV *plperl_spi_execute_fetch_result(SPITupleTable *tuptable, + uint64 processed, int status); static void plperl_return_next_internal(SV *sv); static char *hek2cstr(HE *he); static SV **hv_store_string(HV *hv, const char *key, SV *val); static SV **hv_fetch_string(HV *hv, const char *key); -static void plperl_create_sub(plperl_proc_desc *desc, const char *s, Oid fn_oid); +static void plperl_create_sub(plperl_proc_desc *prodesc, const char *s, + Oid fn_oid); static SV *plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo); static void plperl_compile_callback(void *arg); diff --git a/src/timezone/localtime.c b/src/timezone/localtime.c index 20147f1a2c2..ac0376b0c4d 100644 --- a/src/timezone/localtime.c +++ b/src/timezone/localtime.c @@ -86,7 +86,7 @@ static struct pg_tm *gmtsub(pg_time_t const *timep, int_fast32_t offset, struct pg_tm *tmp); static bool increment_overflow(int *ip, int j); static bool increment_overflow_time(pg_time_t *tp, int_fast32_t j); -static int_fast64_t leapcorr(struct state const *sp, pg_time_t); +static int_fast64_t leapcorr(struct state const *sp, pg_time_t t); static struct pg_tm *timesub(pg_time_t const *timep, int_fast32_t offset, struct state const *sp, struct pg_tm *tmp);