On Tue, Nov 28, 2023 at 11:54:33AM +1100, Peter Smith wrote:
> Here is patch set v3.
> 
> Patches 0001 and 0002 are unchanged from v2.

After some grepping, I've noticed that 0002 had a mistake with
track_commit_timestamp: some alternate output of modules/commit_ts/
was not updated.  meson was able to reproduce the failure as well.

I am not sure regarding what we should do a mixed cases as well, so I
have discarded DateStyle for now, and applied the rest.

Also applied 0001 from Alvaro.

> Patch 0003 now uses a "%s%s%s" format specifier with GUC_FORMAT macro
> in guc.c, as recently suggested by Michael [1].

I cannot think about a better idea as these strings need to be
translated so they need three %s.

+               if (*p == '_')
+                       underscore = true;
+               else if ('a' <= *p && *p <= 'z')
+                       lowercase = true;

An issue with this code is that it would forget to quote GUCs that use
dots, like the ones from an extension.  I don't really see why we
cannot just make the macro return true only if all the characters of a
GUC name is made of lower-case alpha characters?

With an extra indentation applied, I finish with the attached for
0003.
--
Michael
From 77bd6b6f58ab1b0671f6afa12dc4e00900b456a8 Mon Sep 17 00:00:00 2001
From: Michael Paquier <mich...@paquier.xyz>
Date: Thu, 30 Nov 2023 14:58:32 +0900
Subject: [PATCH v4] GUC names - maybe add quotes

---
 src/backend/utils/misc/guc.c                  | 278 ++++++++++++------
 .../expected/test_oat_hooks.out               |  16 +-
 .../unsafe_tests/expected/guc_privs.out       |  58 ++--
 .../unsafe_tests/expected/rolenames.out       |   2 +-
 src/test/regress/expected/compression.out     |   4 +-
 src/test/regress/expected/compression_1.out   |   6 +-
 src/test/regress/expected/create_am.out       |   4 +-
 src/test/regress/expected/guc.out             |  30 +-
 src/test/regress/expected/password.out        |   4 +-
 src/test/regress/expected/subscription.out    |   2 +-
 src/test/regress/expected/transactions.out    |   8 +-
 contrib/auto_explain/t/001_auto_explain.pl    |   2 +-
 src/pl/plperl/expected/plperl_init.out        |   4 +-
 13 files changed, 259 insertions(+), 159 deletions(-)

diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index e76c083003..aad72db9e5 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -265,6 +265,30 @@ static bool call_string_check_hook(struct config_string *conf, char **newval,
 static bool call_enum_check_hook(struct config_enum *conf, int *newval,
 								 void **extra, GucSource source, int elevel);
 
+/* Macro for handling optional quotes around GUC names */
+#define GUC_FORMAT(s)\
+	quotes_needed_for_GUC_name(s) ? "\"" : "",\
+	s,\
+	quotes_needed_for_GUC_name(s) ? "\"" : ""
+
+/*
+ * Return whether the GUC name should be enclosed in double-quotes.
+ *
+ * Quoting is intended for names which could be mistaken for normal English
+ * words.  Quotes are only applied to GUC names that are written entirely with
+ * lower-case alphabetical characters.
+ */
+static bool
+quotes_needed_for_GUC_name(const char *name)
+{
+	for (const char *p = name; *p; p++)
+	{
+		if ('a' > *p || *p > 'z')
+			return false;
+	}
+
+	return true;
+}
 
 /*
  * This function handles both actual config file (re)loads and execution of
@@ -420,8 +444,9 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
 			/* Invalid non-custom variable, so complain */
 			ereport(elevel,
 					(errcode(ERRCODE_UNDEFINED_OBJECT),
-					 errmsg("unrecognized configuration parameter \"%s\" in file \"%s\" line %d",
-							item->name,
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("unrecognized configuration parameter %s%s%s in file \"%s\" line %d",
+							GUC_FORMAT(item->name),
 							item->filename, item->sourceline)));
 			item->errmsg = pstrdup("unrecognized configuration parameter");
 			error = true;
@@ -460,10 +485,13 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
 			gconf->status |= GUC_PENDING_RESTART;
 			ereport(elevel,
 					(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-					 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-							gconf->name)));
-			record_config_file_error(psprintf("parameter \"%s\" cannot be changed without restarting the server",
-											  gconf->name),
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+							GUC_FORMAT(gconf->name))));
+			record_config_file_error(
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+									 psprintf("parameter %s%s%s cannot be changed without restarting the server",
+											  GUC_FORMAT(gconf->name)),
 									 NULL, 0,
 									 &head, &tail);
 			error = true;
@@ -496,8 +524,9 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
 			/* Log the change if appropriate */
 			if (context == PGC_SIGHUP)
 				ereport(elevel,
-						(errmsg("parameter \"%s\" removed from configuration file, reset to default",
-								gconf->name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						(errmsg("parameter %s%s%s removed from configuration file, reset to default",
+								GUC_FORMAT(gconf->name))));
 		}
 	}
 
@@ -561,8 +590,10 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
 					post_value = "";
 				if (strcmp(pre_value, post_value) != 0)
 					ereport(elevel,
-							(errmsg("parameter \"%s\" changed to \"%s\"",
-									item->name, item->value)));
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							(errmsg("parameter %s%s%s changed to \"%s\"",
+									GUC_FORMAT(item->name),
+									item->value)));
 			}
 			item->applied = true;
 		}
@@ -1129,8 +1160,9 @@ assignable_custom_variable_name(const char *name, bool skip_errors, int elevel)
 			if (!skip_errors)
 				ereport(elevel,
 						(errcode(ERRCODE_INVALID_NAME),
-						 errmsg("invalid configuration parameter name \"%s\"",
-								name),
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("invalid configuration parameter name %s%s%s",
+								GUC_FORMAT(name)),
 						 errdetail("Custom parameter names must be two or more simple identifiers separated by dots.")));
 			return false;
 		}
@@ -1145,8 +1177,9 @@ assignable_custom_variable_name(const char *name, bool skip_errors, int elevel)
 				if (!skip_errors)
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_NAME),
-							 errmsg("invalid configuration parameter name \"%s\"",
-									name),
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("invalid configuration parameter name %s%s%s",
+									GUC_FORMAT(name)),
 							 errdetail("\"%s\" is a reserved prefix.",
 									   rcprefix)));
 				return false;
@@ -1160,8 +1193,9 @@ assignable_custom_variable_name(const char *name, bool skip_errors, int elevel)
 	if (!skip_errors)
 		ereport(elevel,
 				(errcode(ERRCODE_UNDEFINED_OBJECT),
-				 errmsg("unrecognized configuration parameter \"%s\"",
-						name)));
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("unrecognized configuration parameter %s%s%s",
+						GUC_FORMAT(name))));
 	return false;
 }
 
@@ -1270,8 +1304,9 @@ find_option(const char *name, bool create_placeholders, bool skip_errors,
 	if (!skip_errors)
 		ereport(elevel,
 				(errcode(ERRCODE_UNDEFINED_OBJECT),
-				 errmsg("unrecognized configuration parameter \"%s\"",
-						name)));
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("unrecognized configuration parameter %s%s%s",
+						GUC_FORMAT(name))));
 	return NULL;
 }
 
@@ -3125,8 +3160,9 @@ parse_and_validate_value(struct config_generic *record,
 				{
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("parameter \"%s\" requires a Boolean value",
-									name)));
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("parameter %s%s%s requires a Boolean value",
+									GUC_FORMAT(name))));
 					return false;
 				}
 
@@ -3145,8 +3181,9 @@ parse_and_validate_value(struct config_generic *record,
 				{
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("invalid value for parameter \"%s\": \"%s\"",
-									name, value),
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+									GUC_FORMAT(name), value),
 							 hintmsg ? errhint("%s", _(hintmsg)) : 0));
 					return false;
 				}
@@ -3157,11 +3194,12 @@ parse_and_validate_value(struct config_generic *record,
 
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("%d%s%s is outside the valid range for parameter \"%s\" (%d .. %d)",
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("%d%s%s is outside the valid range for parameter %s%s%s (%d .. %d)",
 									newval->intval,
 									unit ? " " : "",
 									unit ? unit : "",
-									name,
+									GUC_FORMAT(name),
 									conf->min, conf->max)));
 					return false;
 				}
@@ -3181,8 +3219,9 @@ parse_and_validate_value(struct config_generic *record,
 				{
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("invalid value for parameter \"%s\": \"%s\"",
-									name, value),
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+									GUC_FORMAT(name), value),
 							 hintmsg ? errhint("%s", _(hintmsg)) : 0));
 					return false;
 				}
@@ -3193,11 +3232,12 @@ parse_and_validate_value(struct config_generic *record,
 
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("%g%s%s is outside the valid range for parameter \"%s\" (%g .. %g)",
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("%g%s%s is outside the valid range for parameter %s%s%s (%g .. %g)",
 									newval->realval,
 									unit ? " " : "",
 									unit ? unit : "",
-									name,
+									GUC_FORMAT(name),
 									conf->min, conf->max)));
 					return false;
 				}
@@ -3251,8 +3291,9 @@ parse_and_validate_value(struct config_generic *record,
 
 					ereport(elevel,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("invalid value for parameter \"%s\": \"%s\"",
-									name, value),
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+									GUC_FORMAT(name), value),
 							 hintmsg ? errhint("%s", _(hintmsg)) : 0));
 
 					if (hintmsg)
@@ -3410,8 +3451,9 @@ set_config_option_ext(const char *name, const char *value,
 			{
 				ereport(elevel,
 						(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-						 errmsg("parameter \"%s\" cannot be changed",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("parameter %s%s%s cannot be changed",
+								GUC_FORMAT(name))));
 				return 0;
 			}
 			break;
@@ -3433,8 +3475,9 @@ set_config_option_ext(const char *name, const char *value,
 			{
 				ereport(elevel,
 						(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-						 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+								GUC_FORMAT(name))));
 				return 0;
 			}
 			break;
@@ -3443,8 +3486,9 @@ set_config_option_ext(const char *name, const char *value,
 			{
 				ereport(elevel,
 						(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-						 errmsg("parameter \"%s\" cannot be changed now",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("parameter %s%s%s cannot be changed now",
+								GUC_FORMAT(name))));
 				return 0;
 			}
 
@@ -3470,8 +3514,9 @@ set_config_option_ext(const char *name, const char *value,
 					/* No granted privilege */
 					ereport(elevel,
 							(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-							 errmsg("permission denied to set parameter \"%s\"",
-									name)));
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("permission denied to set parameter %s%s%s",
+									GUC_FORMAT(name))));
 					return 0;
 				}
 			}
@@ -3508,8 +3553,9 @@ set_config_option_ext(const char *name, const char *value,
 			{
 				ereport(elevel,
 						(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-						 errmsg("parameter \"%s\" cannot be set after connection start",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("parameter %s%s%s cannot be set after connection start",
+								GUC_FORMAT(name))));
 				return 0;
 			}
 			break;
@@ -3528,8 +3574,9 @@ set_config_option_ext(const char *name, const char *value,
 					/* No granted privilege */
 					ereport(elevel,
 							(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-							 errmsg("permission denied to set parameter \"%s\"",
-									name)));
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("permission denied to set parameter %s%s%s",
+									GUC_FORMAT(name))));
 					return 0;
 				}
 			}
@@ -3567,16 +3614,18 @@ set_config_option_ext(const char *name, const char *value,
 			 */
 			ereport(elevel,
 					(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-					 errmsg("cannot set parameter \"%s\" within security-definer function",
-							name)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("cannot set parameter %s%s%s within security-definer function",
+							GUC_FORMAT(name))));
 			return 0;
 		}
 		if (InSecurityRestrictedOperation())
 		{
 			ereport(elevel,
 					(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-					 errmsg("cannot set parameter \"%s\" within security-restricted operation",
-							name)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("cannot set parameter %s%s%s within security-restricted operation",
+							GUC_FORMAT(name))));
 			return 0;
 		}
 	}
@@ -3588,15 +3637,18 @@ set_config_option_ext(const char *name, const char *value,
 		{
 			ereport(elevel,
 					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-					 errmsg("parameter \"%s\" cannot be reset", name)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("parameter %s%s%s cannot be reset",
+							GUC_FORMAT(name))));
 			return 0;
 		}
 		if (action == GUC_ACTION_SAVE)
 		{
 			ereport(elevel,
 					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-					 errmsg("parameter \"%s\" cannot be set locally in functions",
-							name)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("parameter %s%s%s cannot be set locally in functions",
+							GUC_FORMAT(name))));
 			return 0;
 		}
 	}
@@ -3621,8 +3673,8 @@ set_config_option_ext(const char *name, const char *value,
 	{
 		if (changeVal && !makeDefault)
 		{
-			elog(DEBUG3, "\"%s\": setting ignored because previous source is higher priority",
-				 name);
+			elog(DEBUG3, "%s%s%s: setting ignored because previous source is higher priority",
+				 GUC_FORMAT(name));
 			return -1;
 		}
 		changeVal = false;
@@ -3673,8 +3725,13 @@ set_config_option_ext(const char *name, const char *value,
 						record->status |= GUC_PENDING_RESTART;
 						ereport(elevel,
 								(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-								 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-										name)));
+
+						/*
+						 * translator: %s%s%s is for an optionally quoted GUC
+						 * name
+						 */
+								 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+										GUC_FORMAT(name))));
 						return 0;
 					}
 					record->status &= ~GUC_PENDING_RESTART;
@@ -3771,8 +3828,13 @@ set_config_option_ext(const char *name, const char *value,
 						record->status |= GUC_PENDING_RESTART;
 						ereport(elevel,
 								(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-								 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-										name)));
+
+						/*
+						 * translator: %s%s%s is for an optionally quoted GUC
+						 * name
+						 */
+								 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+										GUC_FORMAT(name))));
 						return 0;
 					}
 					record->status &= ~GUC_PENDING_RESTART;
@@ -3869,8 +3931,13 @@ set_config_option_ext(const char *name, const char *value,
 						record->status |= GUC_PENDING_RESTART;
 						ereport(elevel,
 								(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-								 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-										name)));
+
+						/*
+						 * translator: %s%s%s is for an optionally quoted GUC
+						 * name
+						 */
+								 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+										GUC_FORMAT(name))));
 						return 0;
 					}
 					record->status &= ~GUC_PENDING_RESTART;
@@ -3993,8 +4060,13 @@ set_config_option_ext(const char *name, const char *value,
 						record->status |= GUC_PENDING_RESTART;
 						ereport(elevel,
 								(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-								 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-										name)));
+
+						/*
+						 * translator: %s%s%s is for an optionally quoted GUC
+						 * name
+						 */
+								 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+										GUC_FORMAT(name))));
 						return 0;
 					}
 					record->status &= ~GUC_PENDING_RESTART;
@@ -4096,8 +4168,13 @@ set_config_option_ext(const char *name, const char *value,
 						record->status |= GUC_PENDING_RESTART;
 						ereport(elevel,
 								(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-								 errmsg("parameter \"%s\" cannot be changed without restarting the server",
-										name)));
+
+						/*
+						 * translator: %s%s%s is for an optionally quoted GUC
+						 * name
+						 */
+								 errmsg("parameter %s%s%s cannot be changed without restarting the server",
+										GUC_FORMAT(name))));
 						return 0;
 					}
 					record->status &= ~GUC_PENDING_RESTART;
@@ -4238,7 +4315,9 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
 		!ConfigOptionIsVisible(record))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("permission denied to examine \"%s\"", name),
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("permission denied to examine %s%s%s",
+						GUC_FORMAT(name)),
 				 errdetail("Only roles with privileges of the \"%s\" role may examine this parameter.",
 						   "pg_read_all_settings")));
 
@@ -4534,8 +4613,9 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt)
 			if (aclresult != ACLCHECK_OK)
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("permission denied to set parameter \"%s\"",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("permission denied to set parameter %s%s%s",
+								GUC_FORMAT(name))));
 		}
 	}
 
@@ -4559,8 +4639,9 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt)
 				(record->flags & GUC_DISALLOW_IN_AUTO_FILE))
 				ereport(ERROR,
 						(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
-						 errmsg("parameter \"%s\" cannot be changed",
-								name)));
+				/* translator: %s%s%s is for an optionally quoted GUC name */
+						 errmsg("parameter %s%s%s cannot be changed",
+								GUC_FORMAT(name))));
 
 			/*
 			 * If a value is specified, verify that it's sane.
@@ -4575,8 +4656,9 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt)
 											  &newval, &newextra))
 					ereport(ERROR,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("invalid value for parameter \"%s\": \"%s\"",
-									name, value)));
+					/* translator: %s%s%s is for an optionally quoted GUC name */
+							 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+									GUC_FORMAT(name), value)));
 
 				if (record->vartype == PGC_STRING && newval.stringval != NULL)
 					guc_free(newval.stringval);
@@ -4830,7 +4912,9 @@ define_custom_variable(struct config_generic *variable)
 	if ((hentry->gucvar->flags & GUC_CUSTOM_PLACEHOLDER) == 0)
 		ereport(ERROR,
 				(errcode(ERRCODE_INTERNAL_ERROR),
-				 errmsg("attempt to redefine parameter \"%s\"", name)));
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("attempt to redefine parameter %s%s%s",
+						GUC_FORMAT(name))));
 
 	Assert(hentry->gucvar->vartype == PGC_STRING);
 	pHolder = (struct config_string *) hentry->gucvar;
@@ -5169,8 +5253,9 @@ MarkGUCPrefixReserved(const char *className)
 		{
 			ereport(WARNING,
 					(errcode(ERRCODE_INVALID_NAME),
-					 errmsg("invalid configuration parameter name \"%s\", removing it",
-							var->name),
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("invalid configuration parameter name %s%s%s, removing it",
+							GUC_FORMAT(var->name)),
 					 errdetail("\"%s\" is now a reserved prefix.",
 							   className)));
 			/* Remove it from the hash table */
@@ -5313,7 +5398,9 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
 	if (!ConfigOptionIsVisible(record))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("permission denied to examine \"%s\"", name),
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("permission denied to examine %s%s%s",
+						GUC_FORMAT(name)),
 				 errdetail("Only roles with privileges of the \"%s\" role may examine this parameter.",
 						   "pg_read_all_settings")));
 
@@ -5639,7 +5726,8 @@ read_nondefault_variables(void)
 			break;
 
 		if (find_option(varname, true, false, FATAL) == NULL)
-			elog(FATAL, "failed to locate variable \"%s\" in exec config params file", varname);
+			elog(FATAL, "failed to locate variable %s%s%s in exec config params file",
+				 GUC_FORMAT(varname));
 
 		if ((varvalue = read_string_with_null(fp)) == NULL)
 			elog(FATAL, "invalid format of exec config params file");
@@ -6048,8 +6136,9 @@ guc_restore_error_context_callback(void *arg)
 	char	  **error_context_name_and_value = (char **) arg;
 
 	if (error_context_name_and_value)
-		errcontext("while setting parameter \"%s\" to \"%s\"",
-				   error_context_name_and_value[0],
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+		errcontext("while setting parameter %s%s%s to \"%s\"",
+				   GUC_FORMAT(error_context_name_and_value[0]),
 				   error_context_name_and_value[1]);
 }
 
@@ -6217,7 +6306,9 @@ RestoreGUCState(void *gucstate)
 		if (result <= 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INTERNAL_ERROR),
-					 errmsg("parameter \"%s\" could not be set", varname)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("parameter %s%s%s could not be set",
+							GUC_FORMAT(varname))));
 		if (varsourcefile[0])
 			set_config_sourcefile(varname, varsourcefile, varsourceline);
 		error_context_callback.arg = NULL;
@@ -6307,8 +6398,9 @@ TransformGUCArray(ArrayType *array, List **names, List **values)
 		{
 			ereport(WARNING,
 					(errcode(ERRCODE_SYNTAX_ERROR),
-					 errmsg("could not parse setting for parameter \"%s\"",
-							name)));
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("could not parse setting for parameter %s%s%s",
+							GUC_FORMAT(name))));
 			pfree(name);
 			continue;
 		}
@@ -6625,7 +6717,9 @@ validate_option_array_item(const char *name, const char *value,
 			return false;
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("permission denied to set parameter \"%s\"", name)));
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("permission denied to set parameter %s%s%s",
+						GUC_FORMAT(name))));
 	}
 
 	/* manual permissions check so we can avoid an error being thrown */
@@ -6689,8 +6783,9 @@ call_bool_check_hook(struct config_bool *conf, bool *newval, void **extra,
 				(errcode(GUC_check_errcode_value),
 				 GUC_check_errmsg_string ?
 				 errmsg_internal("%s", GUC_check_errmsg_string) :
-				 errmsg("invalid value for parameter \"%s\": %d",
-						conf->gen.name, (int) *newval),
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("invalid value for parameter %s%s%s: %d",
+						GUC_FORMAT(conf->gen.name), (int) *newval),
 				 GUC_check_errdetail_string ?
 				 errdetail_internal("%s", GUC_check_errdetail_string) : 0,
 				 GUC_check_errhint_string ?
@@ -6723,8 +6818,9 @@ call_int_check_hook(struct config_int *conf, int *newval, void **extra,
 				(errcode(GUC_check_errcode_value),
 				 GUC_check_errmsg_string ?
 				 errmsg_internal("%s", GUC_check_errmsg_string) :
-				 errmsg("invalid value for parameter \"%s\": %d",
-						conf->gen.name, *newval),
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("invalid value for parameter %s%s%s: %d",
+						GUC_FORMAT(conf->gen.name), *newval),
 				 GUC_check_errdetail_string ?
 				 errdetail_internal("%s", GUC_check_errdetail_string) : 0,
 				 GUC_check_errhint_string ?
@@ -6757,8 +6853,9 @@ call_real_check_hook(struct config_real *conf, double *newval, void **extra,
 				(errcode(GUC_check_errcode_value),
 				 GUC_check_errmsg_string ?
 				 errmsg_internal("%s", GUC_check_errmsg_string) :
-				 errmsg("invalid value for parameter \"%s\": %g",
-						conf->gen.name, *newval),
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("invalid value for parameter %s%s%s: %g",
+						GUC_FORMAT(conf->gen.name), *newval),
 				 GUC_check_errdetail_string ?
 				 errdetail_internal("%s", GUC_check_errdetail_string) : 0,
 				 GUC_check_errhint_string ?
@@ -6800,8 +6897,10 @@ call_string_check_hook(struct config_string *conf, char **newval, void **extra,
 					(errcode(GUC_check_errcode_value),
 					 GUC_check_errmsg_string ?
 					 errmsg_internal("%s", GUC_check_errmsg_string) :
-					 errmsg("invalid value for parameter \"%s\": \"%s\"",
-							conf->gen.name, *newval ? *newval : ""),
+			/* translator: %s%s%s is for an optionally quoted GUC name */
+					 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+							GUC_FORMAT(conf->gen.name),
+							*newval ? *newval : ""),
 					 GUC_check_errdetail_string ?
 					 errdetail_internal("%s", GUC_check_errdetail_string) : 0,
 					 GUC_check_errhint_string ?
@@ -6841,8 +6940,9 @@ call_enum_check_hook(struct config_enum *conf, int *newval, void **extra,
 				(errcode(GUC_check_errcode_value),
 				 GUC_check_errmsg_string ?
 				 errmsg_internal("%s", GUC_check_errmsg_string) :
-				 errmsg("invalid value for parameter \"%s\": \"%s\"",
-						conf->gen.name,
+		/* translator: %s%s%s is for an optionally quoted GUC name */
+				 errmsg("invalid value for parameter %s%s%s: \"%s\"",
+						GUC_FORMAT(conf->gen.name),
 						config_enum_lookup_by_value(conf, *newval)),
 				 GUC_check_errdetail_string ?
 				 errdetail_internal("%s", GUC_check_errdetail_string) : 0,
diff --git a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
index f80373aecc..042569d27a 100644
--- a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
+++ b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
@@ -180,10 +180,10 @@ NOTICE:  in object_access_hook_str: non-superuser finished alter (subId=0x1000,
 NOTICE:  in process utility: non-superuser finished RESET
 ALTER SYSTEM SET work_mem = 8192;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "work_mem"
+ERROR:  permission denied to set parameter work_mem
 ALTER SYSTEM RESET work_mem;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "work_mem"
+ERROR:  permission denied to set parameter work_mem
 SET test_oat_hooks.user_var1 = true;
 NOTICE:  in process utility: non-superuser attempting SET
 NOTICE:  in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var1]
@@ -191,13 +191,13 @@ NOTICE:  in object_access_hook_str: non-superuser finished alter (subId=0x1000,
 NOTICE:  in process utility: non-superuser finished SET
 SET test_oat_hooks.super_var1 = true;
 NOTICE:  in process utility: non-superuser attempting SET
-ERROR:  permission denied to set parameter "test_oat_hooks.super_var1"
+ERROR:  permission denied to set parameter test_oat_hooks.super_var1
 ALTER SYSTEM SET test_oat_hooks.user_var1 = true;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "test_oat_hooks.user_var1"
+ERROR:  permission denied to set parameter test_oat_hooks.user_var1
 ALTER SYSTEM SET test_oat_hooks.super_var1 = true;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "test_oat_hooks.super_var1"
+ERROR:  permission denied to set parameter test_oat_hooks.super_var1
 SET test_oat_hooks.user_var2 = true;
 NOTICE:  in process utility: non-superuser attempting SET
 NOTICE:  in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var2]
@@ -205,13 +205,13 @@ NOTICE:  in object_access_hook_str: non-superuser finished alter (subId=0x1000,
 NOTICE:  in process utility: non-superuser finished SET
 SET test_oat_hooks.super_var2 = true;
 NOTICE:  in process utility: non-superuser attempting SET
-ERROR:  permission denied to set parameter "test_oat_hooks.super_var2"
+ERROR:  permission denied to set parameter test_oat_hooks.super_var2
 ALTER SYSTEM SET test_oat_hooks.user_var2 = true;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "test_oat_hooks.user_var2"
+ERROR:  permission denied to set parameter test_oat_hooks.user_var2
 ALTER SYSTEM SET test_oat_hooks.super_var2 = true;
 NOTICE:  in process utility: non-superuser attempting ALTER SYSTEM
-ERROR:  permission denied to set parameter "test_oat_hooks.super_var2"
+ERROR:  permission denied to set parameter test_oat_hooks.super_var2
 RESET SESSION AUTHORIZATION;
 NOTICE:  in process utility: non-superuser attempting RESET
 NOTICE:  in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
diff --git a/src/test/modules/unsafe_tests/expected/guc_privs.out b/src/test/modules/unsafe_tests/expected/guc_privs.out
index 6c0ad89834..6c594a4b40 100644
--- a/src/test/modules/unsafe_tests/expected/guc_privs.out
+++ b/src/test/modules/unsafe_tests/expected/guc_privs.out
@@ -8,31 +8,31 @@ CREATE ROLE regress_admin SUPERUSER;
 SET SESSION AUTHORIZATION regress_admin;
 -- PGC_BACKEND
 SET ignore_system_indexes = OFF;  -- fail, cannot be set after connection start
-ERROR:  parameter "ignore_system_indexes" cannot be set after connection start
+ERROR:  parameter ignore_system_indexes cannot be set after connection start
 RESET ignore_system_indexes;  -- fail, cannot be set after connection start
-ERROR:  parameter "ignore_system_indexes" cannot be set after connection start
+ERROR:  parameter ignore_system_indexes cannot be set after connection start
 ALTER SYSTEM SET ignore_system_indexes = OFF;  -- ok
 ALTER SYSTEM RESET ignore_system_indexes;  -- ok
 -- PGC_INTERNAL
 SET block_size = 50;  -- fail, cannot be changed
-ERROR:  parameter "block_size" cannot be changed
+ERROR:  parameter block_size cannot be changed
 RESET block_size;  -- fail, cannot be changed
-ERROR:  parameter "block_size" cannot be changed
+ERROR:  parameter block_size cannot be changed
 ALTER SYSTEM SET block_size = 50;  -- fail, cannot be changed
-ERROR:  parameter "block_size" cannot be changed
+ERROR:  parameter block_size cannot be changed
 ALTER SYSTEM RESET block_size;  -- fail, cannot be changed
-ERROR:  parameter "block_size" cannot be changed
+ERROR:  parameter block_size cannot be changed
 -- PGC_POSTMASTER
 SET autovacuum_freeze_max_age = 1000050000;  -- fail, requires restart
-ERROR:  parameter "autovacuum_freeze_max_age" cannot be changed without restarting the server
+ERROR:  parameter autovacuum_freeze_max_age cannot be changed without restarting the server
 RESET autovacuum_freeze_max_age;  -- fail, requires restart
-ERROR:  parameter "autovacuum_freeze_max_age" cannot be changed without restarting the server
+ERROR:  parameter autovacuum_freeze_max_age cannot be changed without restarting the server
 ALTER SYSTEM SET autovacuum_freeze_max_age = 1000050000;  -- ok
 ALTER SYSTEM RESET autovacuum_freeze_max_age;  -- ok
 ALTER SYSTEM SET config_file = '/usr/local/data/postgresql.conf';  -- fail, cannot be changed
-ERROR:  parameter "config_file" cannot be changed
+ERROR:  parameter config_file cannot be changed
 ALTER SYSTEM RESET config_file;  -- fail, cannot be changed
-ERROR:  parameter "config_file" cannot be changed
+ERROR:  parameter config_file cannot be changed
 -- PGC_SIGHUP
 SET autovacuum = OFF;  -- fail, requires reload
 ERROR:  parameter "autovacuum" cannot be changed now
@@ -47,9 +47,9 @@ ALTER SYSTEM SET lc_messages = 'C';  -- ok
 ALTER SYSTEM RESET lc_messages;  -- ok
 -- PGC_SU_BACKEND
 SET jit_debugging_support = OFF;  -- fail, cannot be set after connection start
-ERROR:  parameter "jit_debugging_support" cannot be set after connection start
+ERROR:  parameter jit_debugging_support cannot be set after connection start
 RESET jit_debugging_support;  -- fail, cannot be set after connection start
-ERROR:  parameter "jit_debugging_support" cannot be set after connection start
+ERROR:  parameter jit_debugging_support cannot be set after connection start
 ALTER SYSTEM SET jit_debugging_support = OFF;  -- ok
 ALTER SYSTEM RESET jit_debugging_support;  -- ok
 -- PGC_USERSET
@@ -58,9 +58,9 @@ RESET DateStyle;  -- ok
 ALTER SYSTEM SET DateStyle = 'ISO, MDY';  -- ok
 ALTER SYSTEM RESET DateStyle;  -- ok
 ALTER SYSTEM SET ssl_renegotiation_limit = 0;  -- fail, cannot be changed
-ERROR:  parameter "ssl_renegotiation_limit" cannot be changed
+ERROR:  parameter ssl_renegotiation_limit cannot be changed
 ALTER SYSTEM RESET ssl_renegotiation_limit;  -- fail, cannot be changed
-ERROR:  parameter "ssl_renegotiation_limit" cannot be changed
+ERROR:  parameter ssl_renegotiation_limit cannot be changed
 -- Finished testing superuser
 -- Create non-superuser with privileges to configure host resource usage
 CREATE ROLE regress_host_resource_admin NOSUPERUSER;
@@ -224,7 +224,7 @@ SELECT 1 FROM pg_parameter_acl WHERE parname = 'none.such';
 ALTER SYSTEM SET none.such = 'whiz bang';
 -- None of the above should have created a placeholder GUC for none.such.
 SHOW none.such;  -- error
-ERROR:  unrecognized configuration parameter "none.such"
+ERROR:  unrecognized configuration parameter none.such
 -- However, if we reload ...
 SELECT pg_reload_conf();
  pg_reload_conf 
@@ -244,7 +244,7 @@ SHOW none.such;
 
 -- Can't grant on a non-existent core GUC.
 GRANT ALL ON PARAMETER no_such_guc TO regress_host_resource_admin;  -- fail
-ERROR:  unrecognized configuration parameter "no_such_guc"
+ERROR:  unrecognized configuration parameter no_such_guc
 -- Initially there are no privileges and no catalog entry for this GUC.
 SELECT has_parameter_privilege('regress_host_resource_admin', 'enable_material', 'SET');
  has_parameter_privilege 
@@ -446,17 +446,17 @@ ALTER ROLE regress_host_resource_admin SET lc_messages = 'C';
 SET SESSION AUTHORIZATION regress_host_resource_admin;
 ALTER SYSTEM SET autovacuum_work_mem = 32;  -- ok, privileges have been granted
 ALTER SYSTEM SET ignore_system_indexes = OFF;  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "ignore_system_indexes"
+ERROR:  permission denied to set parameter ignore_system_indexes
 ALTER SYSTEM RESET autovacuum_multixact_freeze_max_age;  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "autovacuum_multixact_freeze_max_age"
+ERROR:  permission denied to set parameter autovacuum_multixact_freeze_max_age
 SET jit_provider = 'llvmjit';  -- fail, insufficient privileges
-ERROR:  parameter "jit_provider" cannot be changed without restarting the server
+ERROR:  parameter jit_provider cannot be changed without restarting the server
 SELECT set_config ('jit_provider', 'llvmjit', true); -- fail, insufficient privileges
-ERROR:  parameter "jit_provider" cannot be changed without restarting the server
+ERROR:  parameter jit_provider cannot be changed without restarting the server
 ALTER SYSTEM SET shared_buffers = 50;  -- ok
 ALTER SYSTEM RESET shared_buffers;  -- ok
 SET autovacuum_work_mem = 50;  -- cannot be changed now
-ERROR:  parameter "autovacuum_work_mem" cannot be changed now
+ERROR:  parameter autovacuum_work_mem cannot be changed now
 ALTER SYSTEM RESET temp_file_limit;  -- ok
 SET TimeZone = 'Europe/Helsinki';  -- ok
 RESET TimeZone;  -- ok
@@ -465,13 +465,13 @@ RESET max_stack_depth;  -- ok, privileges have been granted
 ALTER SYSTEM SET max_stack_depth = '100kB';  -- ok, privileges have been granted
 ALTER SYSTEM RESET max_stack_depth;  -- ok, privileges have been granted
 SET lc_messages = 'C';  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "lc_messages"
+ERROR:  permission denied to set parameter lc_messages
 RESET lc_messages;  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "lc_messages"
+ERROR:  permission denied to set parameter lc_messages
 ALTER SYSTEM SET lc_messages = 'C';  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "lc_messages"
+ERROR:  permission denied to set parameter lc_messages
 ALTER SYSTEM RESET lc_messages;  -- fail, insufficient privileges
-ERROR:  permission denied to set parameter "lc_messages"
+ERROR:  permission denied to set parameter lc_messages
 SELECT set_config ('temp_buffers', '8192', false); -- ok
  set_config 
 ------------
@@ -482,9 +482,9 @@ ALTER SYSTEM RESET autovacuum_work_mem;  -- ok, privileges have been granted
 ALTER SYSTEM RESET ALL;  -- fail, insufficient privileges
 ERROR:  permission denied to perform ALTER SYSTEM RESET ALL
 ALTER SYSTEM SET none.such2 = 'whiz bang';  -- fail, not superuser
-ERROR:  permission denied to set parameter "none.such2"
+ERROR:  permission denied to set parameter none.such2
 ALTER ROLE regress_host_resource_admin SET lc_messages = 'POSIX';  -- fail
-ERROR:  permission denied to set parameter "lc_messages"
+ERROR:  permission denied to set parameter lc_messages
 ALTER ROLE regress_host_resource_admin SET max_stack_depth = '1MB';  -- ok
 SELECT setconfig FROM pg_db_role_setting
   WHERE setrole = 'regress_host_resource_admin'::regrole;
@@ -537,7 +537,7 @@ DROP ROLE regress_host_resource_admin;  -- ok
 CREATE ROLE regress_host_resource_admin NOSUPERUSER;
 SET SESSION AUTHORIZATION regress_host_resource_admin;
 ALTER SYSTEM SET autovacuum_work_mem = 32;  -- fail, privileges not yet granted
-ERROR:  permission denied to set parameter "autovacuum_work_mem"
+ERROR:  permission denied to set parameter autovacuum_work_mem
 SET SESSION AUTHORIZATION regress_admin;
 GRANT SET, ALTER SYSTEM ON PARAMETER
     autovacuum_work_mem, hash_mem_multiplier, max_stack_depth,
@@ -554,7 +554,7 @@ privileges for parameter work_mem
 DROP OWNED BY regress_host_resource_admin RESTRICT; -- cascade should not be needed
 SET SESSION AUTHORIZATION regress_host_resource_admin;
 ALTER SYSTEM SET autovacuum_work_mem = 32;  -- fail, "drop owned" has dropped privileges
-ERROR:  permission denied to set parameter "autovacuum_work_mem"
+ERROR:  permission denied to set parameter autovacuum_work_mem
 SET SESSION AUTHORIZATION regress_admin;
 DROP ROLE regress_host_resource_admin;  -- ok
 -- Check that "reassign owned" doesn't affect privileges
diff --git a/src/test/modules/unsafe_tests/expected/rolenames.out b/src/test/modules/unsafe_tests/expected/rolenames.out
index 61396b2a80..21d2bac322 100644
--- a/src/test/modules/unsafe_tests/expected/rolenames.out
+++ b/src/test/modules/unsafe_tests/expected/rolenames.out
@@ -1077,7 +1077,7 @@ SHOW session_preload_libraries;
 SET SESSION AUTHORIZATION regress_role_nopriv;
 -- fails with role not member of pg_read_all_settings
 SHOW session_preload_libraries;
-ERROR:  permission denied to examine "session_preload_libraries"
+ERROR:  permission denied to examine session_preload_libraries
 DETAIL:  Only roles with privileges of the "pg_read_all_settings" role may examine this parameter.
 RESET SESSION AUTHORIZATION;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
diff --git a/src/test/regress/expected/compression.out b/src/test/regress/expected/compression.out
index 834b7555cb..7426504e20 100644
--- a/src/test/regress/expected/compression.out
+++ b/src/test/regress/expected/compression.out
@@ -234,10 +234,10 @@ ERROR:  column "f1" has a compression method conflict
 DETAIL:  pglz versus lz4
 -- test default_toast_compression GUC
 SET default_toast_compression = '';
-ERROR:  invalid value for parameter "default_toast_compression": ""
+ERROR:  invalid value for parameter default_toast_compression: ""
 HINT:  Available values: pglz, lz4.
 SET default_toast_compression = 'I do not exist compression';
-ERROR:  invalid value for parameter "default_toast_compression": "I do not exist compression"
+ERROR:  invalid value for parameter default_toast_compression: "I do not exist compression"
 HINT:  Available values: pglz, lz4.
 SET default_toast_compression = 'lz4';
 SET default_toast_compression = 'pglz';
diff --git a/src/test/regress/expected/compression_1.out b/src/test/regress/expected/compression_1.out
index ddcd137c49..5234e47b44 100644
--- a/src/test/regress/expected/compression_1.out
+++ b/src/test/regress/expected/compression_1.out
@@ -225,13 +225,13 @@ ERROR:  column "f1" has a compression method conflict
 DETAIL:  pglz versus lz4
 -- test default_toast_compression GUC
 SET default_toast_compression = '';
-ERROR:  invalid value for parameter "default_toast_compression": ""
+ERROR:  invalid value for parameter default_toast_compression: ""
 HINT:  Available values: pglz.
 SET default_toast_compression = 'I do not exist compression';
-ERROR:  invalid value for parameter "default_toast_compression": "I do not exist compression"
+ERROR:  invalid value for parameter default_toast_compression: "I do not exist compression"
 HINT:  Available values: pglz.
 SET default_toast_compression = 'lz4';
-ERROR:  invalid value for parameter "default_toast_compression": "lz4"
+ERROR:  invalid value for parameter default_toast_compression: "lz4"
 HINT:  Available values: pglz.
 SET default_toast_compression = 'pglz';
 -- test alter compression method
diff --git a/src/test/regress/expected/create_am.out b/src/test/regress/expected/create_am.out
index b50293d514..afa11a6dc9 100644
--- a/src/test/regress/expected/create_am.out
+++ b/src/test/regress/expected/create_am.out
@@ -112,11 +112,11 @@ COMMIT;
 --
 -- prevent empty values
 SET default_table_access_method = '';
-ERROR:  invalid value for parameter "default_table_access_method": ""
+ERROR:  invalid value for parameter default_table_access_method: ""
 DETAIL:  default_table_access_method cannot be empty.
 -- prevent nonexistent values
 SET default_table_access_method = 'I do not exist AM';
-ERROR:  invalid value for parameter "default_table_access_method": "I do not exist AM"
+ERROR:  invalid value for parameter default_table_access_method: "I do not exist AM"
 DETAIL:  Table access method "I do not exist AM" does not exist.
 -- prevent setting it to an index AM
 SET default_table_access_method = 'btree';
diff --git a/src/test/regress/expected/guc.out b/src/test/regress/expected/guc.out
index 127c953297..95b2414bd1 100644
--- a/src/test/regress/expected/guc.out
+++ b/src/test/regress/expected/guc.out
@@ -508,15 +508,15 @@ SELECT '2006-08-13 12:34:56'::timestamptz;
 
 -- Test some simple error cases
 SET seq_page_cost TO 'NaN';
-ERROR:  invalid value for parameter "seq_page_cost": "NaN"
+ERROR:  invalid value for parameter seq_page_cost: "NaN"
 SET vacuum_cost_delay TO '10s';
-ERROR:  10000 ms is outside the valid range for parameter "vacuum_cost_delay" (0 .. 100)
+ERROR:  10000 ms is outside the valid range for parameter vacuum_cost_delay (0 .. 100)
 SET no_such_variable TO 42;
-ERROR:  unrecognized configuration parameter "no_such_variable"
+ERROR:  unrecognized configuration parameter no_such_variable
 -- Test "custom" GUCs created on the fly (which aren't really an
 -- intended feature, but many people use them).
 SHOW custom.my_guc;  -- error, not known yet
-ERROR:  unrecognized configuration parameter "custom.my_guc"
+ERROR:  unrecognized configuration parameter custom.my_guc
 SET custom.my_guc = 42;
 SHOW custom.my_guc;
  custom.my_guc 
@@ -539,26 +539,26 @@ SHOW custom.my.qualified.guc;
 (1 row)
 
 SET custom."bad-guc" = 42;  -- disallowed because -c cannot set this name
-ERROR:  invalid configuration parameter name "custom.bad-guc"
+ERROR:  invalid configuration parameter name custom.bad-guc
 DETAIL:  Custom parameter names must be two or more simple identifiers separated by dots.
 SHOW custom."bad-guc";
-ERROR:  unrecognized configuration parameter "custom.bad-guc"
+ERROR:  unrecognized configuration parameter custom.bad-guc
 SET special."weird name" = 'foo';  -- could be allowed, but we choose not to
-ERROR:  invalid configuration parameter name "special.weird name"
+ERROR:  invalid configuration parameter name special.weird name
 DETAIL:  Custom parameter names must be two or more simple identifiers separated by dots.
 SHOW special."weird name";
-ERROR:  unrecognized configuration parameter "special.weird name"
+ERROR:  unrecognized configuration parameter special.weird name
 -- Check what happens when you try to set a "custom" GUC within the
 -- namespace of an extension.
 SET plpgsql.extra_foo_warnings = true;  -- allowed if plpgsql is not loaded yet
 LOAD 'plpgsql';  -- this will throw a warning and delete the variable
-WARNING:  invalid configuration parameter name "plpgsql.extra_foo_warnings", removing it
+WARNING:  invalid configuration parameter name plpgsql.extra_foo_warnings, removing it
 DETAIL:  "plpgsql" is now a reserved prefix.
 SET plpgsql.extra_foo_warnings = true;  -- now, it's an error
-ERROR:  invalid configuration parameter name "plpgsql.extra_foo_warnings"
+ERROR:  invalid configuration parameter name plpgsql.extra_foo_warnings
 DETAIL:  "plpgsql" is a reserved prefix.
 SHOW plpgsql.extra_foo_warnings;
-ERROR:  unrecognized configuration parameter "plpgsql.extra_foo_warnings"
+ERROR:  unrecognized configuration parameter plpgsql.extra_foo_warnings
 --
 -- Test DISCARD TEMP
 --
@@ -775,9 +775,9 @@ select myfunc(1), current_setting('work_mem');
 
 -- check current_setting()'s behavior with invalid setting name
 select current_setting('nosuch.setting');  -- FAIL
-ERROR:  unrecognized configuration parameter "nosuch.setting"
+ERROR:  unrecognized configuration parameter nosuch.setting
 select current_setting('nosuch.setting', false);  -- FAIL
-ERROR:  unrecognized configuration parameter "nosuch.setting"
+ERROR:  unrecognized configuration parameter nosuch.setting
 select current_setting('nosuch.setting', true) is null;
  ?column? 
 ----------
@@ -811,14 +811,14 @@ create function func_with_bad_set() returns int as $$ select 1 $$
 language sql
 set default_text_search_config = no_such_config;
 NOTICE:  text search configuration "no_such_config" does not exist
-ERROR:  invalid value for parameter "default_text_search_config": "no_such_config"
+ERROR:  invalid value for parameter default_text_search_config: "no_such_config"
 set check_function_bodies = off;
 create function func_with_bad_set() returns int as $$ select 1 $$
 language sql
 set default_text_search_config = no_such_config;
 NOTICE:  text search configuration "no_such_config" does not exist
 select func_with_bad_set();
-ERROR:  invalid value for parameter "default_text_search_config": "no_such_config"
+ERROR:  invalid value for parameter default_text_search_config: "no_such_config"
 reset check_function_bodies;
 set default_with_oids to f;
 -- Should not allow to set it to true.
diff --git a/src/test/regress/expected/password.out b/src/test/regress/expected/password.out
index 924d6e001d..752cffcda0 100644
--- a/src/test/regress/expected/password.out
+++ b/src/test/regress/expected/password.out
@@ -3,10 +3,10 @@
 --
 -- Tests for GUC password_encryption
 SET password_encryption = 'novalue'; -- error
-ERROR:  invalid value for parameter "password_encryption": "novalue"
+ERROR:  invalid value for parameter password_encryption: "novalue"
 HINT:  Available values: md5, scram-sha-256.
 SET password_encryption = true; -- error
-ERROR:  invalid value for parameter "password_encryption": "true"
+ERROR:  invalid value for parameter password_encryption: "true"
 HINT:  Available values: md5, scram-sha-256.
 SET password_encryption = 'md5'; -- ok
 SET password_encryption = 'scram-sha-256'; -- ok
diff --git a/src/test/regress/expected/subscription.out b/src/test/regress/expected/subscription.out
index b15eddbff3..8d9229a932 100644
--- a/src/test/regress/expected/subscription.out
+++ b/src/test/regress/expected/subscription.out
@@ -220,7 +220,7 @@ RESET ROLE;
 ALTER SUBSCRIPTION regress_testsub RENAME TO regress_testsub_foo;
 ALTER SUBSCRIPTION regress_testsub_foo SET (synchronous_commit = local);
 ALTER SUBSCRIPTION regress_testsub_foo SET (synchronous_commit = foobar);
-ERROR:  invalid value for parameter "synchronous_commit": "foobar"
+ERROR:  invalid value for parameter synchronous_commit: "foobar"
 HINT:  Available values: local, remote_write, remote_apply, on, off.
 \dRs+
                                                                                                                  List of subscriptions
diff --git a/src/test/regress/expected/transactions.out b/src/test/regress/expected/transactions.out
index 7f5757e89c..5939ad4d2e 100644
--- a/src/test/regress/expected/transactions.out
+++ b/src/test/regress/expected/transactions.out
@@ -53,7 +53,7 @@ SELECT COUNT(*) FROM xacttest;
 (1 row)
 
 RESET transaction_isolation; -- error
-ERROR:  parameter "transaction_isolation" cannot be reset
+ERROR:  parameter transaction_isolation cannot be reset
 END;
 BEGIN TRANSACTION READ ONLY;
 SELECT COUNT(*) FROM xacttest;
@@ -63,7 +63,7 @@ SELECT COUNT(*) FROM xacttest;
 (1 row)
 
 RESET transaction_read_only; -- error
-ERROR:  parameter "transaction_read_only" cannot be reset
+ERROR:  parameter transaction_read_only cannot be reset
 END;
 BEGIN TRANSACTION DEFERRABLE;
 SELECT COUNT(*) FROM xacttest;
@@ -73,11 +73,11 @@ SELECT COUNT(*) FROM xacttest;
 (1 row)
 
 RESET transaction_deferrable; -- error
-ERROR:  parameter "transaction_deferrable" cannot be reset
+ERROR:  parameter transaction_deferrable cannot be reset
 END;
 CREATE FUNCTION errfunc() RETURNS int LANGUAGE SQL AS 'SELECT 1'
 SET transaction_read_only = on; -- error
-ERROR:  parameter "transaction_read_only" cannot be set locally in functions
+ERROR:  parameter transaction_read_only cannot be set locally in functions
 -- Read-only tests
 CREATE TABLE writetest (a int);
 CREATE TEMPORARY TABLE temptest (a int);
diff --git a/contrib/auto_explain/t/001_auto_explain.pl b/contrib/auto_explain/t/001_auto_explain.pl
index abb422f8de..056001a0d6 100644
--- a/contrib/auto_explain/t/001_auto_explain.pl
+++ b/contrib/auto_explain/t/001_auto_explain.pl
@@ -201,7 +201,7 @@ GRANT SET ON PARAMETER auto_explain.log_format TO regress_user1;
 
 	like(
 		$log_contents,
-		qr/WARNING: ( 42501:)? permission denied to set parameter "auto_explain\.log_level"/,
+		qr/WARNING: ( 42501:)? permission denied to set parameter auto_explain\.log_level/,
 		"permission failure logged");
 
 }    # end queries run as regress_user1
diff --git a/src/pl/plperl/expected/plperl_init.out b/src/pl/plperl/expected/plperl_init.out
index 4b7e925419..6d6825cfed 100644
--- a/src/pl/plperl/expected/plperl_init.out
+++ b/src/pl/plperl/expected/plperl_init.out
@@ -23,7 +23,7 @@ SET ROLE regress_plperl_user;
 SET SESSION plperl.on_plperl_init = 'test';
 RESET ROLE;
 LOAD 'plperl';
-WARNING:  permission denied to set parameter "plperl.on_plperl_init"
+WARNING:  permission denied to set parameter plperl.on_plperl_init
 SHOW plperl.on_plperl_init;
  plperl.on_plperl_init 
 -----------------------
@@ -35,6 +35,6 @@ WARNING:  42 at line 1.
 -- now we won't be allowed to set it in the first place
 SET ROLE regress_plperl_user;
 SET SESSION plperl.on_plperl_init = 'test';
-ERROR:  permission denied to set parameter "plperl.on_plperl_init"
+ERROR:  permission denied to set parameter plperl.on_plperl_init
 RESET ROLE;
 DROP ROLE regress_plperl_user;
-- 
2.42.0

Attachment: signature.asc
Description: PGP signature

Reply via email to