From: Michael Paquier Date: Thu, 6 Nov 2025 07:22:12 +0000 (+0900) Subject: Document some structures in attribute_stats.c X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6c132d83bff76acd569175af7f53b7c1bf429f4;p=thirdparty%2Fpostgresql.git Document some structures in attribute_stats.c Like relation_stats.c, these structures are used to track the argument number, names and types of pg_restore_attribute_stats() and pg_clear_attribute_stats(). Extracted from a larger patch by the same author, reworded by me for consistency with relation_stats.c. Author: Corey Huinker Discussion: https://postgr.es/m/CADkLM=dpz3KFnqP-dgJ-zvRvtjsa8UZv8wDAQdqho=qN3kX0Zg@mail.gmail.com --- diff --git a/src/backend/statistics/attribute_stats.c b/src/backend/statistics/attribute_stats.c index 401bf571f27..ef4d768feab 100644 --- a/src/backend/statistics/attribute_stats.c +++ b/src/backend/statistics/attribute_stats.c @@ -36,6 +36,11 @@ #define DEFAULT_AVG_WIDTH Int32GetDatum(0) /* unknown */ #define DEFAULT_N_DISTINCT Float4GetDatum(0.0) /* unknown */ +/* + * Positional argument numbers, names, and types for + * attribute_statistics_update() and pg_restore_attribute_stats(). + */ + enum attribute_stats_argnum { ATTRELSCHEMA_ARG = 0, @@ -82,6 +87,11 @@ static struct StatsArgInfo attarginfo[] = [NUM_ATTRIBUTE_STATS_ARGS] = {0} }; +/* + * Positional argument numbers, names, and types for + * pg_clear_attribute_stats(). + */ + enum clear_attribute_stats_argnum { C_ATTRELSCHEMA_ARG = 0,