Use correct spelling of statistics kind
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:53:11 +0000 (04:53 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:56:17 +0000 (04:56 +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/mvdistinct.c
src/include/nodes/relation.h

index 9d6d65acd9f9779b64100c913e8cb6e7c75d7361..29f60fd92a63f29f952771ccf2e93315d1fa5a1b 100644 (file)
@@ -6575,7 +6575,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
index 1a41d2d96974b970206f38716006163ccf0981dd..e7f2d6c0ca75b87b68d3782ab52759160e233862 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 2df5f7dc3a571af529f8df137b2ea316f45dc06e..e6423eb628ca0be076bb3037728a8927a78cfa25 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 f8dba74cbd3dd64a29aaef13b737d6e045a288a0..593932455f742158495098ab78c64f28935430e3 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 098116b0d8b7152b56cfdb839d8e89b0e0359b13..c6585714182f8ccc27915a7fa567bfa56e0f1b35 100644 (file)
@@ -857,7 +857,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;