mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +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 supersedesa243569bf6and8d9978a717, 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:
		| @@ -1119,7 +1119,7 @@ validateRecoveryParameters(void) | ||||
| 		if ((PrimaryConnInfo == NULL || strcmp(PrimaryConnInfo, "") == 0) && | ||||
| 			(recoveryRestoreCommand == NULL || strcmp(recoveryRestoreCommand, "") == 0)) | ||||
| 			ereport(WARNING, | ||||
| 					(errmsg("specified neither primary_conninfo nor restore_command"), | ||||
| 					(errmsg("specified neither \"primary_conninfo\" nor \"restore_command\""), | ||||
| 					 errhint("The database server will regularly poll the pg_wal subdirectory to check for files placed there."))); | ||||
| 	} | ||||
| 	else | ||||
| @@ -1128,7 +1128,7 @@ validateRecoveryParameters(void) | ||||
| 			strcmp(recoveryRestoreCommand, "") == 0) | ||||
| 			ereport(FATAL, | ||||
| 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE), | ||||
| 					 errmsg("must specify restore_command when standby mode is not enabled"))); | ||||
| 					 errmsg("must specify \"restore_command\" when standby mode is not enabled"))); | ||||
| 	} | ||||
|  | ||||
| 	/* | ||||
| @@ -2162,7 +2162,7 @@ CheckTablespaceDirectory(void) | ||||
| 					 errmsg("unexpected directory entry \"%s\" found in %s", | ||||
| 							de->d_name, "pg_tblspc/"), | ||||
| 					 errdetail("All directory entries in pg_tblspc/ should be symbolic links."), | ||||
| 					 errhint("Remove those directories, or set allow_in_place_tablespaces to ON transiently to let recovery complete."))); | ||||
| 					 errhint("Remove those directories, or set \"allow_in_place_tablespaces\" to ON transiently to let recovery complete."))); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -4771,7 +4771,7 @@ error_multiple_recovery_targets(void) | ||||
| 	ereport(ERROR, | ||||
| 			(errcode(ERRCODE_INVALID_PARAMETER_VALUE), | ||||
| 			 errmsg("multiple recovery targets specified"), | ||||
| 			 errdetail("At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, recovery_target_xid may be set."))); | ||||
| 			 errdetail("At most one of \"recovery_target\", \"recovery_target_lsn\", \"recovery_target_name\", \"recovery_target_time\", \"recovery_target_xid\" may be set."))); | ||||
| } | ||||
|  | ||||
| /* | ||||
| @@ -4855,7 +4855,7 @@ check_recovery_target_name(char **newval, void **extra, GucSource source) | ||||
| 	/* Use the value of newval directly */ | ||||
| 	if (strlen(*newval) >= MAXFNAMELEN) | ||||
| 	{ | ||||
| 		GUC_check_errdetail("%s is too long (maximum %d characters).", | ||||
| 		GUC_check_errdetail("\"%s\" is too long (maximum %d characters).", | ||||
| 							"recovery_target_name", MAXFNAMELEN - 1); | ||||
| 		return false; | ||||
| 	} | ||||
| @@ -4979,7 +4979,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source) | ||||
| 		strtoul(*newval, NULL, 0); | ||||
| 		if (errno == EINVAL || errno == ERANGE) | ||||
| 		{ | ||||
| 			GUC_check_errdetail("recovery_target_timeline is not a valid number."); | ||||
| 			GUC_check_errdetail("\"recovery_target_timeline\" is not a valid number."); | ||||
| 			return false; | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user