Use correct spelling of statistics kind
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:51:53 +0000 (04:51 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:57:45 +0000 (04:57 +0100)
A couple error messages and comments used 'statistic kind', not the
correct 'statistics kind'. Fix and backpatch all the way back to 10,
where extended statistics were introduced.

Backpatch-through: 10

doc/src/sgml/catalogs.sgml
src/backend/statistics/dependencies.c
src/backend/statistics/extended_stats.c
src/backend/statistics/mcv.c
src/backend/statistics/mvdistinct.c
src/include/nodes/pathnodes.h

index 1429b2d05c8a9e60b480f25a6ea892c7fc0ef7b3..304196c216340ca3e5de053fc22072474b068315 100644 (file)
@@ -6596,7 +6596,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       <entry><type>char[]</type></entry>
       <entry></entry>
       <entry>
-        An array containing codes for the enabled statistic kinds;
+        An array containing codes for the enabled statistics kinds;
         valid values are:
         <literal>d</literal> for n-distinct statistics,
         <literal>f</literal> for functional dependency statistics, and
index 560c1c9e845d9819960778fbadb83346a9a3e226..44dd5b2762ebf18ba498bfad46b4f4dc909b1a48 100644 (file)
@@ -646,7 +646,7 @@ statext_dependencies_load(Oid mvoid)
                           Anum_pg_statistic_ext_data_stxddependencies, &isnull);
    if (isnull)
        elog(ERROR,
-            "requested statistic kind \"%c\" is not yet built for statistics object %u",
+            "requested statistics kind \"%c\" is not yet built for statistics object %u",
             STATS_EXT_DEPENDENCIES, mvoid);
 
    result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
index d8e5150023257e3e6c1a697f4c6f76eb3dfee362..8951543b7eb4235c50e1c6700072b9134065ecb2 100644 (file)
@@ -60,7 +60,7 @@ typedef struct StatExtEntry
    char       *schema;         /* statistics object's schema */
    char       *name;           /* statistics object's name */
    Bitmapset  *columns;        /* attribute numbers covered by the object */
-   List       *types;          /* 'char' list of enabled statistic kinds */
+   List       *types;          /* 'char' list of enabled statistics kinds */
 } StatExtEntry;
 
 
index cec06f8c444eebf1ec6a75ad06644522d3a539d6..8443f412bad03e454680c688fe1ae21e16b93f8a 100644 (file)
@@ -571,7 +571,7 @@ statext_mcv_load(Oid mvoid)
 
    if (isnull)
        elog(ERROR,
-            "requested statistic kind \"%c\" is not yet built for statistics object %u",
+            "requested statistics kind \"%c\" is not yet built for statistics object %u",
             STATS_EXT_DEPENDENCIES, mvoid);
 
    result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
index 228fa2684feb3ad31fe0e381540eb980eb6931a5..682ba08a4c32ee34839a9f4bc3ca22f791cdfe7a 100644 (file)
@@ -154,7 +154,7 @@ statext_ndistinct_load(Oid mvoid)
                            Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
    if (isnull)
        elog(ERROR,
-            "requested statistic kind \"%c\" is not yet built for statistics object %u",
+            "requested statistics kind \"%c\" is not yet built for statistics object %u",
             STATS_EXT_NDISTINCT, mvoid);
 
    result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
index 5de52edda4a6c9e346c21551476ae170d3f067df..b6d4b0eda0ab25d14c369df45f17c77180e0ac50 100644 (file)
@@ -878,7 +878,7 @@ typedef struct StatisticExtInfo
 
    Oid         statOid;        /* OID of the statistics row */
    RelOptInfo *rel;            /* back-link to statistic's table */
-   char        kind;           /* statistic kind of this entry */
+   char        kind;           /* statistics kind of this entry */
    Bitmapset  *keys;           /* attnums of the columns covered */
 } StatisticExtInfo;