Content-Length: 277804 | pFad | http://github.com/postgrespro/postgres_cluster/commit/79aa44536f3980d324f486504cde643ce23bf5c6
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21f1e15 commit 79aa445Copy full SHA for 79aa445
src/backend/utils/adt/pgstatfuncs.c
@@ -1537,9 +1537,17 @@ pg_stat_reset(PG_FUNCTION_ARGS)
1537
Datum
1538
pg_stat_reset_shared(PG_FUNCTION_ARGS)
1539
{
1540
- char *target = text_to_cstring(PG_GETARG_TEXT_PP(0));
1541
-
1542
- pgstat_reset_shared_counters(target);
+ if (PG_ARGISNULL(0))
+ /*
+ * Same error message as in pgstat_reset_shared_counters(),
1543
+ * to keep translations the same.
1544
+ */
1545
+ ereport(ERROR,
1546
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1547
+ errmsg("unrecognized reset target: \"%s\"", "null"),
1548
+ errhint("Target must be \"bgwriter\".")));
1549
+
1550
+ pgstat_reset_shared_counters(text_to_cstring(PG_GETARG_TEXT_PP(0)));
1551
1552
PG_RETURN_VOID();
1553
}
Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/79aa44536f3980d324f486504cde643ce23bf5c6
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy
0 commit comments