Use correct spelling of statistics kind
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 03:45:26 +0000 (04:45 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 23 Mar 2021 04:01:35 +0000 (05:01 +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 68d196069859bb40174598926447883490f0aa97..bae4d8cdd36a9cb294751fc630ac6168348e5c11 100644 (file)
@@ -7370,7 +7370,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
        <structfield>stxkind</structfield> <type>char[]</type>
       </para>
       <para>
-       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 f6e399b192fbdf0b12c452c29da87e070699bedb..eac92851651e81227b32f72b389a29336826f9c5 100644 (file)
@@ -639,7 +639,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 fa42851fd519174d66f17f4279dbd8a69a394f1d..7808c6a09cac71d57ac437ef37c95d1a368894de 100644 (file)
@@ -64,7 +64,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 */
    int         stattarget;     /* statistics target (-1 for default) */
 } StatExtEntry;
 
index abbc1f1ba8b91a394fe25a284892fd4427df7a1b..8335dff2418d5d26f7eade663db26de52256095a 100644 (file)
@@ -570,7 +570,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 9ef21debb63bbeac6e2c8369e546b0cfb61cee86..e08c001e3f4f1ac5c44649cf2289d0da53410b5b 100644 (file)
@@ -153,7 +153,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 86405a274ed75a55f41c24db1b9e414d6d0dce6a..e4aed435385186a8cd1d0b0b1e6054235475af89 100644 (file)
@@ -923,7 +923,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;