diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-09-29 15:29:45 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-09-29 15:29:45 +0900 |
commit | 2cf9cf5d7b5e66202389618a4c08945da352b35c (patch) | |
tree | 3e7f6d201f5caaaa736fd983bc5fcf9713a2562a /src/backend/statistics | |
parent | 2a27dbaeb9088718baa25bc97f2e049e063412db (diff) |
Clarify use of "statistics objects" in the code
The code inconsistently used "statistic object" or "statistics" where
the correct term, as discussed, is actually "statistics object". This
improves the state of the code to be more consistent.
While on it, fix an incorrect error message introduced in a4d75c8. This
error should never happen, as the code states, but it would be
misleading.
Author: Justin Pryzby
Reviewed-by: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/20210924215827.GS831@telsasoft.com
Backpatch-through: 14
Diffstat (limited to 'src/backend/statistics')
-rw-r--r-- | src/backend/statistics/extended_stats.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index 5fa36e0036e..0d106f0343f 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -182,7 +182,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows, continue; } - /* compute statistics target for this statistics */ + /* compute statistics target for this statistics object */ stattarget = statext_compute_stattarget(stat->stattarget, bms_num_members(stat->columns), stats); @@ -195,7 +195,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows, if (stattarget == 0) continue; - /* evaluate expressions (if the statistics has any) */ + /* evaluate expressions (if the statistics object has any) */ data = make_build_data(onerel, stat, numrows, rows, stats, stattarget); /* compute statistic of each requested type */ @@ -257,9 +257,9 @@ BuildRelationExtStatistics(Relation onerel, double totalrows, * when analyzing only some of the columns, this will skip statistics objects * that would require additional columns. * - * See statext_compute_stattarget for details about how we compute statistics - * target for a statistics object (from the object target, attribute targets - * and default statistics target). + * See statext_compute_stattarget for details about how we compute the + * statistics target for a statistics object (from the object target, + * attribute targets and default statistics target). */ int ComputeExtStatisticsRows(Relation onerel, @@ -329,8 +329,8 @@ ComputeExtStatisticsRows(Relation onerel, * * When computing target for extended statistics objects, we consider three * places where the target may be set - the statistics object itself, - * attributes the statistics is defined on, and then the default statistics - * target. + * attributes the statistics object is defined on, and then the default + * statistics target. * * First we look at what's set for the statistics object itself, using the * ALTER STATISTICS ... SET STATISTICS command. If we find a valid value @@ -1789,8 +1789,8 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli /* * The clause was not estimated yet, and we've extracted either - * attnums of expressions from it. Ignore it if it's not fully - * covered by the chosen statistics. + * attnums or expressions from it. Ignore it if it's not fully + * covered by the chosen statistics object. * * We need to check both attributes and expressions, and reject if * either is not covered. |