From 17974ec259463869bb6bb4885d46847422fbc9ec Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 17 May 2024 11:23:08 +0200 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w%40mail.gmail.com --- src/backend/commands/variable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/variable.c') 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 */ -- cgit v1.2.3