]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix two error messages in extended_stats_funcs.c
authorMichael Paquier <michael@paquier.xyz>
Thu, 29 Jan 2026 05:57:47 +0000 (14:57 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 29 Jan 2026 05:57:47 +0000 (14:57 +0900)
These have been fat-fingered in 0e80f3f88dea and 302879bd68d1.  The
error message for ndistinct had an incorrect grammar, while the one for
dependencies had finished with a period (incorrect based on the project
guidelines).

Discussion: https://postgr.es/m/aXrsjZQbVuB6236u@paquier.xyz

src/backend/statistics/extended_stats_funcs.c
src/test/regress/expected/stats_import.out

index 6fff31330e65f193c5584a2ee63f673e8e5e0e94..db107684607311a7b9794061e57f70c06ea6a831 100644 (file)
@@ -418,7 +418,7 @@ extended_statistics_update(FunctionCallInfo fcinfo)
        {
                ereport(WARNING,
                                errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                               errmsg("cannot not specify parameter \"%s\"",
+                               errmsg("cannot specify parameter \"%s\"",
                                           extarginfo[NDISTINCT_ARG].argname),
                                errhint("Extended statistics object \"%s\".\"%s\" does not support statistics of this type.",
                                                quote_identifier(nspname),
@@ -436,7 +436,7 @@ extended_statistics_update(FunctionCallInfo fcinfo)
        {
                ereport(WARNING,
                                errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                               errmsg("cannot specify parameter \"%s\".",
+                               errmsg("cannot specify parameter \"%s\"",
                                           extarginfo[DEPENDENCIES_ARG].argname),
                                errhint("Extended statistics object \"%s\".\"%s\" does not support statistics of this type.",
                                                quote_identifier(nspname),
index 284a49bbc4e8d3e04efa2fa1478c4fbc4464e2e4..37131f9ceaba2c9f0cd6c4907886cd5edcf15b81 100644 (file)
@@ -1761,7 +1761,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
   'statistics_name', 'test_stat_dependencies',
   'inherited', false,
   'n_distinct', '[{"attributes" : [1,3], "ndistinct" : 4}]'::pg_ndistinct);
-WARNING:  cannot not specify parameter "n_distinct"
+WARNING:  cannot specify parameter "n_distinct"
 HINT:  Extended statistics object "stats_import"."test_stat_dependencies" does not support statistics of this type.
  pg_restore_extended_stats 
 ---------------------------
@@ -1777,7 +1777,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
   'inherited', false,
   'dependencies', '[{"attributes": [2], "dependency": 3, "degree": 1.000000},
                     {"attributes": [3], "dependency": 2, "degree": 1.000000}]'::pg_dependencies);
-WARNING:  cannot specify parameter "dependencies".
+WARNING:  cannot specify parameter "dependencies"
 HINT:  Extended statistics object "stats_import"."test_stat_ndistinct" does not support statistics of this type.
  pg_restore_extended_stats 
 ---------------------------