Fix redefinition of typedef RangeVar.
authorNathan Bossart <[email protected]>
Wed, 15 Oct 2025 18:14:00 +0000 (13:14 -0500)
committerNathan Bossart <[email protected]>
Wed, 15 Oct 2025 18:14:00 +0000 (13:14 -0500)
Commit c8af5019be added a forward declaration for this typedef that
caused redefinitions, which are not valid in C99.

Per buildfarm members longfin and sifaka.

Discussion: https://postgr.es/m/aO_fzfnKVXMd_RUM%40nathan
Backpatch-through: 18 only

src/include/statistics/stat_utils.h

index f41b181d4d3a39d97d43a89ac358739a16611c7a..4283d2c4053c091364019eef1e3f178a04d0b6b4 100644 (file)
@@ -16,7 +16,7 @@
 #include "fmgr.h"
 
 /* avoid including primnodes.h here */
-typedef struct RangeVar RangeVar;
+struct RangeVar;
 
 struct StatsArgInfo
 {
@@ -33,7 +33,7 @@ extern bool stats_check_arg_pair(FunctionCallInfo fcinfo,
                                 struct StatsArgInfo *arginfo,
                                 int argnum1, int argnum2);
 
-extern void RangeVarCallbackForStats(const RangeVar *relation,
+extern void RangeVarCallbackForStats(const struct RangeVar *relation,
                                     Oid relId, Oid oldRelid, void *arg);
 
 extern bool stats_fill_fcinfo_from_arg_pairs(FunctionCallInfo pairs_fcinfo,