1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

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 a243569bf6 and
8d9978a717, 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
This commit is contained in:
Peter Eisentraut
2024-05-17 11:23:08 +02:00
parent be5942aee7
commit 17974ec259
79 changed files with 208 additions and 215 deletions

View File

@@ -885,7 +885,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker)
return;
ereport(LOG,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("background worker \"%s\": must be registered in shared_preload_libraries",
errmsg("background worker \"%s\": must be registered in \"shared_preload_libraries\"",
worker->bgw_name)));
return;
}

View File

@@ -442,7 +442,7 @@ CheckpointerMain(char *startup_data, size_t startup_data_len)
"checkpoints are occurring too frequently (%d seconds apart)",
elapsed_secs,
elapsed_secs),
errhint("Consider increasing the configuration parameter max_wal_size.")));
errhint("Consider increasing the configuration parameter \"%s\".", "max_wal_size")));
/*
* Initialize checkpointer-private variables used during

View File

@@ -425,7 +425,7 @@ pgarch_ArchiverCopyLoop(void)
!ArchiveCallbacks->check_configured_cb(archive_module_state))
{
ereport(WARNING,
(errmsg("archive_mode enabled, yet archiving is not configured"),
(errmsg("\"archive_mode\" enabled, yet archiving is not configured"),
arch_module_check_errdetail_string ?
errdetail_internal("%s", arch_module_check_errdetail_string) : 0));
return;
@@ -876,8 +876,8 @@ HandlePgArchInterrupts(void)
if (XLogArchiveLibrary[0] != '\0' && XLogArchiveCommand[0] != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("both archive_command and archive_library set"),
errdetail("Only one of archive_command, archive_library may be set.")));
errmsg("both \"archive_command\" and \"archive_library\" set"),
errdetail("Only one of \"archive_command\", \"archive_library\" may be set.")));
archiveLibChanged = strcmp(XLogArchiveLibrary, archiveLib) != 0;
pfree(archiveLib);
@@ -915,8 +915,8 @@ LoadArchiveLibrary(void)
if (XLogArchiveLibrary[0] != '\0' && XLogArchiveCommand[0] != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("both archive_command and archive_library set"),
errdetail("Only one of archive_command, archive_library may be set.")));
errmsg("both \"archive_command\" and \"archive_library\" set"),
errdetail("Only one of \"archive_command\", \"archive_library\" may be set.")));
/*
* If shell archiving is enabled, use our special initialization function.

View File

@@ -822,7 +822,7 @@ PostmasterMain(int argc, char *argv[])
*/
if (SuperuserReservedConnections + ReservedConnections >= MaxConnections)
{
write_stderr("%s: superuser_reserved_connections (%d) plus reserved_connections (%d) must be less than max_connections (%d)\n",
write_stderr("%s: \"superuser_reserved_connections\" (%d) plus \"reserved_connections\" (%d) must be less than \"max_connections\" (%d)\n",
progname,
SuperuserReservedConnections, ReservedConnections,
MaxConnections);
@@ -830,13 +830,13 @@ PostmasterMain(int argc, char *argv[])
}
if (XLogArchiveMode > ARCHIVE_MODE_OFF && wal_level == WAL_LEVEL_MINIMAL)
ereport(ERROR,
(errmsg("WAL archival cannot be enabled when wal_level is \"minimal\"")));
(errmsg("WAL archival cannot be enabled when \"wal_level\" is \"minimal\"")));
if (max_wal_senders > 0 && wal_level == WAL_LEVEL_MINIMAL)
ereport(ERROR,
(errmsg("WAL streaming (max_wal_senders > 0) requires wal_level \"replica\" or \"logical\"")));
(errmsg("WAL streaming (\"max_wal_senders\" > 0) requires \"wal_level\" to be \"replica\" or \"logical\"")));
if (summarize_wal && wal_level == WAL_LEVEL_MINIMAL)
ereport(ERROR,
(errmsg("WAL cannot be summarized when wal_level is \"minimal\"")));
(errmsg("WAL cannot be summarized when \"wal_level\" is \"minimal\"")));
/*
* Other one-time internal sanity checks can go here, if they are fast.
@@ -3359,7 +3359,7 @@ PostmasterStateMachine(void)
if (!restart_after_crash)
{
ereport(LOG,
(errmsg("shutting down because restart_after_crash is off")));
(errmsg("shutting down because \"restart_after_crash\" is off")));
ExitPostmaster(1);
}
}