From 165fce8411908ca3e61ecb9a072a901ee6297db8 Mon Sep 17 00:00:00 2001 From: Corey Huinker Date: Sun, 28 Jun 2026 21:39:15 -0500 Subject: [PATCH v2 09/13] Rename relation_statistics_update and relation_stats_argnum. Rename relation_statistics_update to update_relstats. This allows us to create a public function of that same name. Rename relation_stats_argnum to relation_args_argnum, because it covers all parameters of pg_restore_relation_stats, not just the statistical ones. This makes way for a publicly visible enum that has only statistical ones. --- src/backend/statistics/relation_stats.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/statistics/relation_stats.c b/src/backend/statistics/relation_stats.c index 213f924a44e..d4459981ebc 100644 --- a/src/backend/statistics/relation_stats.c +++ b/src/backend/statistics/relation_stats.c @@ -31,10 +31,10 @@ /* * Positional argument numbers, names, and types for - * relation_statistics_update(). + * update_relstats(). */ -enum relation_stats_argnum +enum relation_args_argnum { RELARG_SCHEMA = 0, RELARG_RELNAME, @@ -56,13 +56,13 @@ static struct StatsArgInfo relarginfo[] = [RELARG_NUM_RELARGS] = {0} }; -static bool relation_statistics_update(const NullableDatum *args); +static bool update_relstats(const NullableDatum *args); /* * Internal function for modifying statistics for a relation. */ static bool -relation_statistics_update(const NullableDatum *args) +update_relstats(const NullableDatum *args) { bool result = true; char *nspname; @@ -218,7 +218,7 @@ pg_clear_relation_stats(PG_FUNCTION_ARGS) newfcinfo->args[5].value = UInt32GetDatum(0); newfcinfo->args[5].isnull = false; - relation_statistics_update(newfcinfo->args); + update_relstats(newfcinfo->args); PG_RETURN_VOID(); } @@ -232,7 +232,7 @@ pg_restore_relation_stats(PG_FUNCTION_ARGS) relarginfo)) result = false; - if (!relation_statistics_update(positional_args)) + if (!update_relstats(positional_args)) result = false; PG_RETURN_BOOL(result); -- 2.50.1 (Apple Git-155)