From 2024b1356f3ec8b0e5fb6ad923bd4bbc4c243668 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 14/33] f!stats typos

---
 doc/src/sgml/perform.sgml               |  2 +-
 src/backend/commands/statscmds.c        |  2 +-
 src/backend/statistics/README           |  2 +-
 src/backend/statistics/extended_stats.c |  2 +-
 src/backend/statistics/mcv.c            |  6 +++---
 src/bin/psql/describe.c                 | 10 +++++-----
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml
index 89ff58338e5..9cf8ebea808 100644
--- a/doc/src/sgml/perform.sgml
+++ b/doc/src/sgml/perform.sgml
@@ -1337,7 +1337,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178}
     <title>Multivariate MCV Lists</title>
 
     <para>
-     Another type of statistics stored for each column are most-common value
+     Another type of statistic stored for each column are most-common value
      lists.  This allows very accurate estimates for individual columns, but
      may result in significant misestimates for queries with conditions on
      multiple columns.
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index f7419b8f562..9b9d50ef32a 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -428,7 +428,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 	 * similar to why we don't bother with extracting columns from
 	 * expressions. It's either expensive or very easy to defeat for
 	 * determined user, and there's no risk if we allow such statistics (the
-	 * statistics is useless, but harmless).
+	 * statistic is useless, but harmless).
 	 */
 	foreach(cell, stxexprs)
 	{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
 Compatible clause types
 -----------------------
 
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
 
     (a) functional dependencies - equality clauses (AND), possibly IS NULL
 
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 87fe82ed114..ca48395d5c5 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -958,7 +958,7 @@ compare_datums_simple(Datum a, Datum b, SortSupport ssup)
  * build_attnums_array
  *		Transforms a bitmap into an array of AttrNumber values.
  *
- * This is used for extended statistics only, so all the attribute must be
+ * This is used for extended statistics only, so all the attributes must be
  * user-defined. That means offsetting by FirstLowInvalidHeapAttributeNumber
  * is not necessary here (and when querying the bitmap).
  */
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index fb51619d88c..1ef30344285 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -134,7 +134,7 @@ static int	count_distinct_groups(int numrows, SortItem *items,
  * This bound is at most 25, and approaches 0 as n approaches 0 or N. The
  * case where n approaches 0 cannot happen in practice, since the sample
  * size is at least 300.  The case where n approaches N corresponds to
- * sampling the whole the table, in which case it is reasonable to keep
+ * sampling the whole table, in which case it is reasonable to keep
  * the whole MCV list (have no lower bound), so it makes sense to apply
  * this formula for all inputs, even though the above derivation is
  * technically only valid when the right hand side is at least around 10.
@@ -295,7 +295,7 @@ statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget)
 		/* Copy the first chunk of groups into the result. */
 		for (i = 0; i < nitems; i++)
 		{
-			/* just pointer to the proper place in the list */
+			/* just point to the proper place in the list */
 			MCVItem    *item = &mcvlist->items[i];
 
 			item->values = (Datum *) palloc(sizeof(Datum) * numattrs);
@@ -556,7 +556,7 @@ build_column_frequencies(SortItem *groups, int ngroups,
 
 /*
  * statext_mcv_load
- *		Load the MCV list for the indicated pg_statistic_ext tuple.
+ *		Load the MCV list for the indicated pg_statistic_ext_data tuple.
  */
 MCVList *
 statext_mcv_load(Oid mvoid, bool inh)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 40433e32fa0..64805789741 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2652,11 +2652,11 @@ describeOneTableDetails(const char *schemaname,
 
 					/*
 					 * When printing kinds we ignore expression statistics,
-					 * which is used only internally and can't be specified by
-					 * user. We don't print the kinds when either none are
-					 * specified (in which case it has to be statistics on a
-					 * single expr) or when all are specified (in which case
-					 * we assume it's expanded by CREATE STATISTICS).
+					 * which are used only internally and can't be specified by
+					 * user. We don't print the kinds when none are specified
+					 * (in which case it has to be statistics on a single expr)
+					 * or when all are specified (in which case we assume it's
+					 * expanded by CREATE STATISTICS).
 					 */
 					has_all = (has_ndistinct && has_dependencies && has_mcv);
 					has_some = (has_ndistinct || has_dependencies || has_mcv);
-- 
2.17.1

