aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-05-17 11:23:08 +0200
committerPeter Eisentraut <peter@eisentraut.org>2024-05-17 11:44:26 +0200
commit17974ec259463869bb6bb4885d46847422fbc9ec (patch)
tree11cd393058415b42093277f2e15de7bf1e186579 /src/backend/commands
parentbe5942aee7a012ce7f30bc7a6617903127f29e89 (diff)
downloadpostgresql-17974ec259463869bb6bb4885d46847422fbc9ec.tar.gz
postgresql-17974ec259463869bb6bb4885d46847422fbc9ec.zip
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 a243569bf65 and 8d9978a7176, 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
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/publicationcmds.c4
-rw-r--r--src/backend/commands/vacuum.c2
-rw-r--r--src/backend/commands/variable.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 9bcc22fdd7e..6ea709988ee 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -858,8 +858,8 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
if (wal_level != WAL_LEVEL_LOGICAL)
ereport(WARNING,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("wal_level is insufficient to publish logical changes"),
- errhint("Set wal_level to \"logical\" before creating subscriptions.")));
+ errmsg("\"wal_level\" is insufficient to publish logical changes"),
+ errhint("Set \"wal_level\" to \"logical\" before creating subscriptions.")));
return myself;
}
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 521ee74586a..48f8eab2022 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -131,7 +131,7 @@ check_vacuum_buffer_usage_limit(int *newval, void **extra,
return true;
/* Value does not fall within any allowable range */
- GUC_check_errdetail("vacuum_buffer_usage_limit must be 0 or between %d kB and %d kB",
+ GUC_check_errdetail("\"vacuum_buffer_usage_limit\" must be 0 or between %d kB and %d kB",
MIN_BAS_VAC_RING_SIZE_KB, MAX_BAS_VAC_RING_SIZE_KB);
return false;
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 01151ca2b5a..9345131711e 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -717,7 +717,7 @@ check_client_encoding(char **newval, void **extra, GucSource source)
else
{
/* Provide a useful complaint */
- GUC_check_errdetail("Cannot change client_encoding now.");
+ GUC_check_errdetail("Cannot change \"client_encoding\" now.");
}
return false;
}
@@ -778,7 +778,7 @@ assign_client_encoding(const char *newval, void *extra)
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
- errmsg("cannot change client_encoding during a parallel operation")));
+ errmsg("cannot change \"client_encoding\" during a parallel operation")));
}
/* We do not expect an error if PrepareClientEncoding succeeded */
@@ -1202,7 +1202,7 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source)
#ifndef USE_PREFETCH
if (*newval != 0)
{
- GUC_check_errdetail("effective_io_concurrency must be set to 0 on platforms that lack posix_fadvise().");
+ GUC_check_errdetail("\"effective_io_concurrency\" must be set to 0 on platforms that lack posix_fadvise().");
return false;
}
#endif /* USE_PREFETCH */
@@ -1215,7 +1215,7 @@ check_maintenance_io_concurrency(int *newval, void **extra, GucSource source)
#ifndef USE_PREFETCH
if (*newval != 0)
{
- GUC_check_errdetail("maintenance_io_concurrency must be set to 0 on platforms that lack posix_fadvise().");
+ GUC_check_errdetail("\"maintenance_io_concurrency\" must be set to 0 on platforms that lack posix_fadvise().");
return false;
}
#endif /* USE_PREFETCH */