]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Adjust some error hints
authorMichael Paquier <michael@paquier.xyz>
Mon, 25 May 2026 23:13:22 +0000 (08:13 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 25 May 2026 23:13:22 +0000 (08:13 +0900)
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 <baji.pgdev@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CA+fm-RMrKbyky_+vi5SDdAVnFVjWh7zW3GoDAVnrp5OpDnW6tw@mail.gmail.com

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

index beddcb552d6503b3d2f724f5a8756c8761684eb3..fecdf0d4b056c51c95c1aeb6ef3f3c6ca668d5bf 100644 (file)
@@ -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."));
        }
 
        /*
index ab748068225ae5dd630db34494f9114e9eca7e42..4a65a46df41a8ab1c79ddec6640c42b7fb4b6c28 100644 (file)
@@ -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;
                }
        }
index 183e68d65c278c715fd0b358befbd540322b947e..4520f0b664eb39f079e0e602cc8a7f94fbf5d410 100644 (file)
@@ -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