Use correct spelling of statistics kind
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:54:34 +0000 (04:54 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:54:34 +0000 (04:54 +0100)
A couple error messages and comments used 'statistic kind', not the
correct 'statistics kind'. Fix and backpack 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/mvdistinct.c
src/include/nodes/relation.h

index 9d983fa2523a7dcc4cf214025866c8b54549e5bf..46a1ba9bbebf5b45b047972b5558e8d52de5e966 100644 (file)
@@ -6445,7 +6445,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</>:<replaceable>&lt;salt&gt;<
       <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
index bc4895f8fb4292740b8646413a77a3ff6d6a581c..95607567eb7009b577e4f93d13f01572b184cd26 100644 (file)
@@ -642,7 +642,7 @@ statext_dependencies_load(Oid mvoid)
                           Anum_pg_statistic_ext_stxdependencies, &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 26c2aedd36caef2119506e2e7bf2345374a69781..b0d0c6b205b2ada7c6ad3bae0408efa3bb367dbb 100644 (file)
@@ -44,7 +44,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 424a79056e1e3ec66f210262fbf6842a3e748504..eb467564cf47c2241b33a72025bafb50cef97527 100644 (file)
@@ -139,7 +139,7 @@ statext_ndistinct_load(Oid mvoid)
                            Anum_pg_statistic_ext_stxndistinct, &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 3c7436cf27e4be520a7b6bc1b0defb525c5316fe..8f45f9f80f28309d8d6ee3485d47cb760b04faec 100644 (file)
@@ -722,7 +722,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;