Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 17974ec

Browse files
committedMay 17, 2024
Revise GUC names quoting in messages again
After further review, we want to move in the direction of always quoting GUC names in error messages, rather than the previous (PG16) wildly mixed practice or the intermittent (mid-PG17) idea of doing this depending on how possibly confusing the GUC name is. This commit applies appropriate quotes to (almost?) all mentions of GUC names in error messages. It partially supersedes a243569 and 8d9978a, which had moved things a bit in the opposite direction but which then were abandoned in a partial state. Author: Peter Smith <smithpb2250@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w%40mail.gmail.com
1 parent be5942a commit 17974ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+208
-215
lines changed
 

‎contrib/pg_prewarm/autoprewarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ apw_start_leader_worker(void)
831831
ereport(ERROR,
832832
(errcode(ERRCODE_INSUFFICIENT_RESOURCES),
833833
errmsg("could not register background process"),
834-
errhint("You may need to increase max_worker_processes.")));
834+
errhint("You may need to increase \"max_worker_processes\".")));
835835

836836
status = WaitForBackgroundWorkerStartup(handle, &pid);
837837
if (status != BGWH_STARTED)
@@ -867,7 +867,7 @@ apw_start_database_worker(void)
867867
ereport(ERROR,
868868
(errcode(ERRCODE_INSUFFICIENT_RESOURCES),
869869
errmsg("registering dynamic bgworker autoprewarm failed"),
870-
errhint("Consider increasing configuration parameter max_worker_processes.")));
870+
errhint("Consider increasing configuration parameter \"max_worker_processes\".")));
871871

872872
/*
873873
* Ignore return value; if it fails, postmaster has died, but we have

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
16601660
if (!pgss || !pgss_hash)
16611661
ereport(ERROR,
16621662
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1663-
errmsg("pg_stat_statements must be loaded via shared_preload_libraries")));
1663+
errmsg("pg_stat_statements must be loaded via \"shared_preload_libraries\"")));
16641664

16651665
InitMaterializedSRF(fcinfo, 0);
16661666

@@ -1989,7 +1989,7 @@ pg_stat_statements_info(PG_FUNCTION_ARGS)
19891989
if (!pgss || !pgss_hash)
19901990
ereport(ERROR,
19911991
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1992-
errmsg("pg_stat_statements must be loaded via shared_preload_libraries")));
1992+
errmsg("pg_stat_statements must be loaded via \"shared_preload_libraries\"")));
19931993

19941994
/* Build a tuple descriptor for our result type */
19951995
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
@@ -2671,7 +2671,7 @@ entry_reset(Oid userid, Oid dbid, uint64 queryid, bool minmax_only)
26712671
if (!pgss || !pgss_hash)
26722672
ereport(ERROR,
26732673
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
2674-
errmsg("pg_stat_statements must be loaded via shared_preload_libraries")));
2674+
errmsg("pg_stat_statements must be loaded via \"shared_preload_libraries\"")));
26752675

26762676
LWLockAcquire(pgss->lock, LW_EXCLUSIVE);
26772677
num_entries = hash_get_num_entries(pgss_hash);

0 commit comments

Comments
 (0)
Please sign in to comment.