From 89e624841f26b628c79a930981ee333c58558c8f Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Sat, 27 Jun 2026 12:02:43 -0400
Subject: [PATCH v2 02/13] Rename attribute_stats_argnum enumeriations.

Rename all attribute_stats_argnum enumerated names from foo_ARG to
ATTARG_foo and C_foo_ARG to C_ATTARG_foo.  This change will help
distinguish these values from other enumerations which will be added in
future commits.
---
 src/backend/statistics/attribute_stats.c | 206 +++++++++++------------
 1 file changed, 103 insertions(+), 103 deletions(-)

diff --git a/src/backend/statistics/attribute_stats.c b/src/backend/statistics/attribute_stats.c
index 1cc4d657231..a0ec667011e 100644
--- a/src/backend/statistics/attribute_stats.c
+++ b/src/backend/statistics/attribute_stats.c
@@ -37,48 +37,48 @@
 
 enum attribute_stats_argnum
 {
-	ATTRELSCHEMA_ARG = 0,
-	ATTRELNAME_ARG,
-	ATTNAME_ARG,
-	ATTNUM_ARG,
-	INHERITED_ARG,
-	NULL_FRAC_ARG,
-	AVG_WIDTH_ARG,
-	N_DISTINCT_ARG,
-	MOST_COMMON_VALS_ARG,
-	MOST_COMMON_FREQS_ARG,
-	HISTOGRAM_BOUNDS_ARG,
-	CORRELATION_ARG,
-	MOST_COMMON_ELEMS_ARG,
-	MOST_COMMON_ELEM_FREQS_ARG,
-	ELEM_COUNT_HISTOGRAM_ARG,
-	RANGE_LENGTH_HISTOGRAM_ARG,
-	RANGE_EMPTY_FRAC_ARG,
-	RANGE_BOUNDS_HISTOGRAM_ARG,
-	NUM_ATTRIBUTE_STATS_ARGS
+	ATTARG_ATTRELSCHEMA = 0,
+	ATTARG_ATTRELNAME,
+	ATTARG_ATTNAME,
+	ATTARG_ATTNUM,
+	ATTARG_INHERITED,
+	ATTARG_NULL_FRAC,
+	ATTARG_AVG_WIDTH,
+	ATTARG_N_DISTINCT,
+	ATTARG_MOST_COMMON_VALS,
+	ATTARG_MOST_COMMON_FREQS,
+	ATTARG_HISTOGRAM_BOUNDS,
+	ATTARG_CORRELATION,
+	ATTARG_MOST_COMMON_ELEMS,
+	ATTARG_MOST_COMMON_ELEM_FREQS,
+	ATTARG_ELEM_COUNT_HISTOGRAM,
+	ATTARG_RANGE_LENGTH_HISTOGRAM,
+	ATTARG_RANGE_EMPTY_FRAC,
+	ATTARG_RANGE_BOUNDS_HISTOGRAM,
+	ATTARG_NUM_ATTARGS
 };
 
 static struct StatsArgInfo attarginfo[] =
 {
-	[ATTRELSCHEMA_ARG] = {"schemaname", TEXTOID},
-	[ATTRELNAME_ARG] = {"relname", TEXTOID},
-	[ATTNAME_ARG] = {"attname", TEXTOID},
-	[ATTNUM_ARG] = {"attnum", INT2OID},
-	[INHERITED_ARG] = {"inherited", BOOLOID},
-	[NULL_FRAC_ARG] = {"null_frac", FLOAT4OID},
-	[AVG_WIDTH_ARG] = {"avg_width", INT4OID},
-	[N_DISTINCT_ARG] = {"n_distinct", FLOAT4OID},
-	[MOST_COMMON_VALS_ARG] = {"most_common_vals", TEXTOID},
-	[MOST_COMMON_FREQS_ARG] = {"most_common_freqs", FLOAT4ARRAYOID},
-	[HISTOGRAM_BOUNDS_ARG] = {"histogram_bounds", TEXTOID},
-	[CORRELATION_ARG] = {"correlation", FLOAT4OID},
-	[MOST_COMMON_ELEMS_ARG] = {"most_common_elems", TEXTOID},
-	[MOST_COMMON_ELEM_FREQS_ARG] = {"most_common_elem_freqs", FLOAT4ARRAYOID},
-	[ELEM_COUNT_HISTOGRAM_ARG] = {"elem_count_histogram", FLOAT4ARRAYOID},
-	[RANGE_LENGTH_HISTOGRAM_ARG] = {"range_length_histogram", TEXTOID},
-	[RANGE_EMPTY_FRAC_ARG] = {"range_empty_frac", FLOAT4OID},
-	[RANGE_BOUNDS_HISTOGRAM_ARG] = {"range_bounds_histogram", TEXTOID},
-	[NUM_ATTRIBUTE_STATS_ARGS] = {0}
+	[ATTARG_ATTRELSCHEMA] = {"schemaname", TEXTOID},
+	[ATTARG_ATTRELNAME] = {"relname", TEXTOID},
+	[ATTARG_ATTNAME] = {"attname", TEXTOID},
+	[ATTARG_ATTNUM] = {"attnum", INT2OID},
+	[ATTARG_INHERITED] = {"inherited", BOOLOID},
+	[ATTARG_NULL_FRAC] = {"null_frac", FLOAT4OID},
+	[ATTARG_AVG_WIDTH] = {"avg_width", INT4OID},
+	[ATTARG_N_DISTINCT] = {"n_distinct", FLOAT4OID},
+	[ATTARG_MOST_COMMON_VALS] = {"most_common_vals", TEXTOID},
+	[ATTARG_MOST_COMMON_FREQS] = {"most_common_freqs", FLOAT4ARRAYOID},
+	[ATTARG_HISTOGRAM_BOUNDS] = {"histogram_bounds", TEXTOID},
+	[ATTARG_CORRELATION] = {"correlation", FLOAT4OID},
+	[ATTARG_MOST_COMMON_ELEMS] = {"most_common_elems", TEXTOID},
+	[ATTARG_MOST_COMMON_ELEM_FREQS] = {"most_common_elem_freqs", FLOAT4ARRAYOID},
+	[ATTARG_ELEM_COUNT_HISTOGRAM] = {"elem_count_histogram", FLOAT4ARRAYOID},
+	[ATTARG_RANGE_LENGTH_HISTOGRAM] = {"range_length_histogram", TEXTOID},
+	[ATTARG_RANGE_EMPTY_FRAC] = {"range_empty_frac", FLOAT4OID},
+	[ATTARG_RANGE_BOUNDS_HISTOGRAM] = {"range_bounds_histogram", TEXTOID},
+	[ATTARG_NUM_ATTARGS] = {0}
 };
 
 /*
@@ -88,20 +88,20 @@ static struct StatsArgInfo attarginfo[] =
 
 enum clear_attribute_stats_argnum
 {
-	C_ATTRELSCHEMA_ARG = 0,
-	C_ATTRELNAME_ARG,
-	C_ATTNAME_ARG,
-	C_INHERITED_ARG,
-	C_NUM_ATTRIBUTE_STATS_ARGS
+	C_ATTARG_ATTRELSCHEMA = 0,
+	C_ATTARG_ATTRELNAME,
+	C_ATTARG_ATTNAME,
+	C_ATTARG_INHERITED,
+	C_ATTARG_NUM_ATTARGS
 };
 
 static struct StatsArgInfo cleararginfo[] =
 {
-	[C_ATTRELSCHEMA_ARG] = {"relation", TEXTOID},
-	[C_ATTRELNAME_ARG] = {"relation", TEXTOID},
-	[C_ATTNAME_ARG] = {"attname", TEXTOID},
-	[C_INHERITED_ARG] = {"inherited", BOOLOID},
-	[C_NUM_ATTRIBUTE_STATS_ARGS] = {0}
+	[C_ATTARG_ATTRELSCHEMA] = {"relation", TEXTOID},
+	[C_ATTARG_ATTRELNAME] = {"relation", TEXTOID},
+	[C_ATTARG_ATTNAME] = {"attname", TEXTOID},
+	[C_ATTARG_INHERITED] = {"inherited", BOOLOID},
+	[C_ATTARG_NUM_ATTARGS] = {0}
 };
 
 static bool attribute_statistics_update(FunctionCallInfo fcinfo);
@@ -151,16 +151,16 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 
 	FmgrInfo	array_in_fn;
 
-	bool		do_mcv = !PG_ARGISNULL(MOST_COMMON_FREQS_ARG) &&
-		!PG_ARGISNULL(MOST_COMMON_VALS_ARG);
-	bool		do_histogram = !PG_ARGISNULL(HISTOGRAM_BOUNDS_ARG);
-	bool		do_correlation = !PG_ARGISNULL(CORRELATION_ARG);
-	bool		do_mcelem = !PG_ARGISNULL(MOST_COMMON_ELEMS_ARG) &&
-		!PG_ARGISNULL(MOST_COMMON_ELEM_FREQS_ARG);
-	bool		do_dechist = !PG_ARGISNULL(ELEM_COUNT_HISTOGRAM_ARG);
-	bool		do_bounds_histogram = !PG_ARGISNULL(RANGE_BOUNDS_HISTOGRAM_ARG);
-	bool		do_range_length_histogram = !PG_ARGISNULL(RANGE_LENGTH_HISTOGRAM_ARG) &&
-		!PG_ARGISNULL(RANGE_EMPTY_FRAC_ARG);
+	bool		do_mcv = !PG_ARGISNULL(ATTARG_MOST_COMMON_FREQS) &&
+		!PG_ARGISNULL(ATTARG_MOST_COMMON_VALS);
+	bool		do_histogram = !PG_ARGISNULL(ATTARG_HISTOGRAM_BOUNDS);
+	bool		do_correlation = !PG_ARGISNULL(ATTARG_CORRELATION);
+	bool		do_mcelem = !PG_ARGISNULL(ATTARG_MOST_COMMON_ELEMS) &&
+		!PG_ARGISNULL(ATTARG_MOST_COMMON_ELEM_FREQS);
+	bool		do_dechist = !PG_ARGISNULL(ATTARG_ELEM_COUNT_HISTOGRAM);
+	bool		do_bounds_histogram = !PG_ARGISNULL(ATTARG_RANGE_BOUNDS_HISTOGRAM);
+	bool		do_range_length_histogram = !PG_ARGISNULL(ATTARG_RANGE_LENGTH_HISTOGRAM) &&
+		!PG_ARGISNULL(ATTARG_RANGE_EMPTY_FRAC);
 
 	Datum		values[Natts_pg_statistic] = {0};
 	bool		nulls[Natts_pg_statistic] = {0};
@@ -168,11 +168,11 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 
 	bool		result = true;
 
-	stats_check_required_arg(fcinfo, attarginfo, ATTRELSCHEMA_ARG);
-	stats_check_required_arg(fcinfo, attarginfo, ATTRELNAME_ARG);
+	stats_check_required_arg(fcinfo, attarginfo, ATTARG_ATTRELSCHEMA);
+	stats_check_required_arg(fcinfo, attarginfo, ATTARG_ATTRELNAME);
 
-	nspname = TextDatumGetCString(PG_GETARG_DATUM(ATTRELSCHEMA_ARG));
-	relname = TextDatumGetCString(PG_GETARG_DATUM(ATTRELNAME_ARG));
+	nspname = TextDatumGetCString(PG_GETARG_DATUM(ATTARG_ATTRELSCHEMA));
+	relname = TextDatumGetCString(PG_GETARG_DATUM(ATTARG_ATTRELNAME));
 
 	if (RecoveryInProgress())
 		ereport(ERROR,
@@ -186,13 +186,13 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 									  RangeVarCallbackForStats, &locked_table);
 
 	/* user can specify either attname or attnum, but not both */
-	if (!PG_ARGISNULL(ATTNAME_ARG))
+	if (!PG_ARGISNULL(ATTARG_ATTNAME))
 	{
-		if (!PG_ARGISNULL(ATTNUM_ARG))
+		if (!PG_ARGISNULL(ATTARG_ATTNUM))
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 					 errmsg("cannot specify both \"%s\" and \"%s\"", "attname", "attnum")));
-		attname = TextDatumGetCString(PG_GETARG_DATUM(ATTNAME_ARG));
+		attname = TextDatumGetCString(PG_GETARG_DATUM(ATTARG_ATTNAME));
 		attnum = get_attnum(reloid, attname);
 		/* note that this test covers attisdropped cases too: */
 		if (attnum == InvalidAttrNumber)
@@ -201,9 +201,9 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 					 errmsg("column \"%s\" of relation \"%s\" does not exist",
 							attname, relname)));
 	}
-	else if (!PG_ARGISNULL(ATTNUM_ARG))
+	else if (!PG_ARGISNULL(ATTARG_ATTNUM))
 	{
-		attnum = PG_GETARG_INT16(ATTNUM_ARG);
+		attnum = PG_GETARG_INT16(ATTARG_ATTNUM);
 		attname = get_attname(reloid, attnum, true);
 		/* annoyingly, get_attname doesn't check attisdropped */
 		if (attname == NULL ||
@@ -228,49 +228,49 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 				 errmsg("cannot modify statistics on system column \"%s\"",
 						attname)));
 
-	stats_check_required_arg(fcinfo, attarginfo, INHERITED_ARG);
-	inherited = PG_GETARG_BOOL(INHERITED_ARG);
+	stats_check_required_arg(fcinfo, attarginfo, ATTARG_INHERITED);
+	inherited = PG_GETARG_BOOL(ATTARG_INHERITED);
 
 	/*
 	 * Check argument sanity. If some arguments are unusable, emit a WARNING
 	 * and set the corresponding argument to NULL in fcinfo.
 	 */
 
-	if (!stats_check_arg_array(fcinfo, attarginfo, MOST_COMMON_FREQS_ARG))
+	if (!stats_check_arg_array(fcinfo, attarginfo, ATTARG_MOST_COMMON_FREQS))
 	{
 		do_mcv = false;
 		result = false;
 	}
 
-	if (!stats_check_arg_array(fcinfo, attarginfo, MOST_COMMON_ELEM_FREQS_ARG))
+	if (!stats_check_arg_array(fcinfo, attarginfo, ATTARG_MOST_COMMON_ELEM_FREQS))
 	{
 		do_mcelem = false;
 		result = false;
 	}
-	if (!stats_check_arg_array(fcinfo, attarginfo, ELEM_COUNT_HISTOGRAM_ARG))
+	if (!stats_check_arg_array(fcinfo, attarginfo, ATTARG_ELEM_COUNT_HISTOGRAM))
 	{
 		do_dechist = false;
 		result = false;
 	}
 
 	if (!stats_check_arg_pair(fcinfo, attarginfo,
-							  MOST_COMMON_VALS_ARG, MOST_COMMON_FREQS_ARG))
+							  ATTARG_MOST_COMMON_VALS, ATTARG_MOST_COMMON_FREQS))
 	{
 		do_mcv = false;
 		result = false;
 	}
 
 	if (!stats_check_arg_pair(fcinfo, attarginfo,
-							  MOST_COMMON_ELEMS_ARG,
-							  MOST_COMMON_ELEM_FREQS_ARG))
+							  ATTARG_MOST_COMMON_ELEMS,
+							  ATTARG_MOST_COMMON_ELEM_FREQS))
 	{
 		do_mcelem = false;
 		result = false;
 	}
 
 	if (!stats_check_arg_pair(fcinfo, attarginfo,
-							  RANGE_LENGTH_HISTOGRAM_ARG,
-							  RANGE_EMPTY_FRAC_ARG))
+							  ATTARG_RANGE_LENGTH_HISTOGRAM,
+							  ATTARG_RANGE_EMPTY_FRAC))
 	{
 		do_range_length_histogram = false;
 		result = false;
@@ -344,19 +344,19 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 								 replaces);
 
 	/* if specified, set to argument values */
-	if (!PG_ARGISNULL(NULL_FRAC_ARG))
+	if (!PG_ARGISNULL(ATTARG_NULL_FRAC))
 	{
-		values[Anum_pg_statistic_stanullfrac - 1] = PG_GETARG_DATUM(NULL_FRAC_ARG);
+		values[Anum_pg_statistic_stanullfrac - 1] = PG_GETARG_DATUM(ATTARG_NULL_FRAC);
 		replaces[Anum_pg_statistic_stanullfrac - 1] = true;
 	}
-	if (!PG_ARGISNULL(AVG_WIDTH_ARG))
+	if (!PG_ARGISNULL(ATTARG_AVG_WIDTH))
 	{
-		values[Anum_pg_statistic_stawidth - 1] = PG_GETARG_DATUM(AVG_WIDTH_ARG);
+		values[Anum_pg_statistic_stawidth - 1] = PG_GETARG_DATUM(ATTARG_AVG_WIDTH);
 		replaces[Anum_pg_statistic_stawidth - 1] = true;
 	}
-	if (!PG_ARGISNULL(N_DISTINCT_ARG))
+	if (!PG_ARGISNULL(ATTARG_N_DISTINCT))
 	{
-		values[Anum_pg_statistic_stadistinct - 1] = PG_GETARG_DATUM(N_DISTINCT_ARG);
+		values[Anum_pg_statistic_stadistinct - 1] = PG_GETARG_DATUM(ATTARG_N_DISTINCT);
 		replaces[Anum_pg_statistic_stadistinct - 1] = true;
 	}
 
@@ -364,10 +364,10 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 	if (do_mcv)
 	{
 		bool		converted;
-		Datum		stanumbers = PG_GETARG_DATUM(MOST_COMMON_FREQS_ARG);
+		Datum		stanumbers = PG_GETARG_DATUM(ATTARG_MOST_COMMON_FREQS);
 		Datum		stavalues = statatt_build_stavalues("most_common_vals",
 														&array_in_fn,
-														PG_GETARG_DATUM(MOST_COMMON_VALS_ARG),
+														PG_GETARG_DATUM(ATTARG_MOST_COMMON_VALS),
 														atttypid, atttypmod,
 														&converted);
 
@@ -407,7 +407,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 
 		stavalues = statatt_build_stavalues("histogram_bounds",
 											&array_in_fn,
-											PG_GETARG_DATUM(HISTOGRAM_BOUNDS_ARG),
+											PG_GETARG_DATUM(ATTARG_HISTOGRAM_BOUNDS),
 											atttypid, atttypmod,
 											&converted);
 
@@ -425,7 +425,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 	/* STATISTIC_KIND_CORRELATION */
 	if (do_correlation)
 	{
-		Datum		elems[] = {PG_GETARG_DATUM(CORRELATION_ARG)};
+		Datum		elems[] = {PG_GETARG_DATUM(ATTARG_CORRELATION)};
 		ArrayType  *arry = construct_array_builtin(elems, 1, FLOAT4OID);
 		Datum		stanumbers = PointerGetDatum(arry);
 
@@ -438,13 +438,13 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 	/* STATISTIC_KIND_MCELEM */
 	if (do_mcelem)
 	{
-		Datum		stanumbers = PG_GETARG_DATUM(MOST_COMMON_ELEM_FREQS_ARG);
+		Datum		stanumbers = PG_GETARG_DATUM(ATTARG_MOST_COMMON_ELEM_FREQS);
 		bool		converted = false;
 		Datum		stavalues;
 
 		stavalues = statatt_build_stavalues("most_common_elems",
 											&array_in_fn,
-											PG_GETARG_DATUM(MOST_COMMON_ELEMS_ARG),
+											PG_GETARG_DATUM(ATTARG_MOST_COMMON_ELEMS),
 											elemtypid, atttypmod,
 											&converted);
 
@@ -462,7 +462,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 	/* STATISTIC_KIND_DECHIST */
 	if (do_dechist)
 	{
-		Datum		stanumbers = PG_GETARG_DATUM(ELEM_COUNT_HISTOGRAM_ARG);
+		Datum		stanumbers = PG_GETARG_DATUM(ATTARG_ELEM_COUNT_HISTOGRAM);
 
 		statatt_set_slot(values, nulls, replaces,
 						 STATISTIC_KIND_DECHIST,
@@ -484,7 +484,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 
 		stavalues = statatt_build_stavalues("range_bounds_histogram",
 											&array_in_fn,
-											PG_GETARG_DATUM(RANGE_BOUNDS_HISTOGRAM_ARG),
+											PG_GETARG_DATUM(ATTARG_RANGE_BOUNDS_HISTOGRAM),
 											atttypid, atttypmod,
 											&converted);
 
@@ -503,7 +503,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 	if (do_range_length_histogram)
 	{
 		/* The anyarray is always a float8[] for this stakind */
-		Datum		elems[] = {PG_GETARG_DATUM(RANGE_EMPTY_FRAC_ARG)};
+		Datum		elems[] = {PG_GETARG_DATUM(ATTARG_RANGE_EMPTY_FRAC)};
 		ArrayType  *arry = construct_array_builtin(elems, 1, FLOAT4OID);
 		Datum		stanumbers = PointerGetDatum(arry);
 
@@ -512,7 +512,7 @@ attribute_statistics_update(FunctionCallInfo fcinfo)
 
 		stavalues = statatt_build_stavalues("range_length_histogram",
 											&array_in_fn,
-											PG_GETARG_DATUM(RANGE_LENGTH_HISTOGRAM_ARG),
+											PG_GETARG_DATUM(ATTARG_RANGE_LENGTH_HISTOGRAM),
 											FLOAT8OID, 0, &converted);
 
 		if (converted)
@@ -605,13 +605,13 @@ pg_clear_attribute_stats(PG_FUNCTION_ARGS)
 	bool		inherited;
 	Oid			locked_table = InvalidOid;
 
-	stats_check_required_arg(fcinfo, cleararginfo, C_ATTRELSCHEMA_ARG);
-	stats_check_required_arg(fcinfo, cleararginfo, C_ATTRELNAME_ARG);
-	stats_check_required_arg(fcinfo, cleararginfo, C_ATTNAME_ARG);
-	stats_check_required_arg(fcinfo, cleararginfo, C_INHERITED_ARG);
+	stats_check_required_arg(fcinfo, cleararginfo, C_ATTARG_ATTRELSCHEMA);
+	stats_check_required_arg(fcinfo, cleararginfo, C_ATTARG_ATTRELNAME);
+	stats_check_required_arg(fcinfo, cleararginfo, C_ATTARG_ATTNAME);
+	stats_check_required_arg(fcinfo, cleararginfo, C_ATTARG_INHERITED);
 
-	nspname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTRELSCHEMA_ARG));
-	relname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTRELNAME_ARG));
+	nspname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTARG_ATTRELSCHEMA));
+	relname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTARG_ATTRELNAME));
 
 	if (RecoveryInProgress())
 		ereport(ERROR,
@@ -623,7 +623,7 @@ pg_clear_attribute_stats(PG_FUNCTION_ARGS)
 									  ShareUpdateExclusiveLock, 0,
 									  RangeVarCallbackForStats, &locked_table);
 
-	attname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTNAME_ARG));
+	attname = TextDatumGetCString(PG_GETARG_DATUM(C_ATTARG_ATTNAME));
 	attnum = get_attnum(reloid, attname);
 
 	if (attnum < 0)
@@ -638,7 +638,7 @@ pg_clear_attribute_stats(PG_FUNCTION_ARGS)
 				 errmsg("column \"%s\" of relation \"%s\" does not exist",
 						attname, get_rel_name(reloid))));
 
-	inherited = PG_GETARG_BOOL(C_INHERITED_ARG);
+	inherited = PG_GETARG_BOOL(C_ATTARG_INHERITED);
 
 	delete_pg_statistic(reloid, attnum, inherited);
 	PG_RETURN_VOID();
@@ -673,10 +673,10 @@ pg_clear_attribute_stats(PG_FUNCTION_ARGS)
 Datum
 pg_restore_attribute_stats(PG_FUNCTION_ARGS)
 {
-	LOCAL_FCINFO(positional_fcinfo, NUM_ATTRIBUTE_STATS_ARGS);
+	LOCAL_FCINFO(positional_fcinfo, ATTARG_NUM_ATTARGS);
 	bool		result = true;
 
-	InitFunctionCallInfoData(*positional_fcinfo, NULL, NUM_ATTRIBUTE_STATS_ARGS,
+	InitFunctionCallInfoData(*positional_fcinfo, NULL, ATTARG_NUM_ATTARGS,
 							 InvalidOid, NULL, NULL);
 
 	if (!stats_fill_fcinfo_from_arg_pairs(fcinfo, positional_fcinfo,
-- 
2.50.1 (Apple Git-155)

