Fix two error messages in extended_stats_funcs.c

These have been fat-fingered in 0e80f3f88d and 302879bd68.  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
This commit is contained in:
Michael Paquier 2026-01-29 14:57:47 +09:00
parent fc365e4fcc
commit 740a1494f4
2 changed files with 4 additions and 4 deletions

View 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),

View 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
---------------------------