From: Michael Paquier Date: Mon, 25 May 2026 23:13:22 +0000 (+0900) Subject: Adjust some error hints X-Git-Tag: REL_19_BETA1~52 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d40aed554227e5f8203798fda25b936a264638ec;p=thirdparty%2Fpostgresql.git Adjust some error hints The wording of two error hints is tweaked in this commit: - Import of extended statistics, where the value of an array element is not a NULL or a string. - Online data checksum switch, where a period was missing. Author: Baji Shaik Reviewed-by: Chao Li Discussion: https://postgr.es/m/CA+fm-RMrKbyky_+vi5SDdAVnFVjWh7zW3GoDAVnrp5OpDnW6tw@mail.gmail.com --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index beddcb552d6..fecdf0d4b05 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6612,7 +6612,7 @@ StartupXLOG(void) ereport(WARNING, errmsg("enabling data checksums was interrupted"), - errhint("Data checksum processing must be manually restarted for checksums to be enabled")); + errhint("Data checksum processing must be manually restarted for checksums to be enabled.")); } /* diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c index ab748068225..4a65a46df41 100644 --- a/src/backend/statistics/extended_stats_funcs.c +++ b/src/backend/statistics/extended_stats_funcs.c @@ -1160,7 +1160,7 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont, ereport(WARNING, errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("could not parse \"%s\": invalid element in expression %d", argname, exprnum), - errhint("Value of element \"%s\" must be type a null or a string.", s)); + errhint("Value of element \"%s\" must be a null or a string.", s)); goto pg_statistic_error; } } diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out index 183e68d65c2..4520f0b664e 100644 --- a/src/test/regress/expected/stats_import.out +++ b/src/test/regress/expected/stats_import.out @@ -2493,7 +2493,7 @@ SELECT pg_catalog.pg_restore_extended_stats( 'exprs', '[ { "null_frac": 1 }, { "null_frac": "0.25" } ]'::jsonb); WARNING: could not parse "exprs": invalid element in expression -1 -HINT: Value of element "null_frac" must be type a null or a string. +HINT: Value of element "null_frac" must be a null or a string. pg_restore_extended_stats --------------------------- f