Make GUC_check_errdetail messages full sentences

They were all missing punctuation, one was missing initial capital.
Per our message style guidelines.

No backpatch, to avoid breaking existing translations.
This commit is contained in:
Álvaro Herrera 2024-11-27 19:46:06 +01:00
parent fd9924542b
commit 6ba9892f5c
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
7 changed files with 13 additions and 11 deletions

View File

@ -358,7 +358,7 @@ check_slru_buffers(const char *name, int *newval)
if (*newval % SLRU_BANK_SIZE == 0)
return true;
GUC_check_errdetail("\"%s\" must be a multiple of %d", name,
GUC_check_errdetail("\"%s\" must be a multiple of %d.", name,
SLRU_BANK_SIZE);
return false;
}

View File

@ -4933,7 +4933,7 @@ check_recovery_target_time(char **newval, void **extra, GucSource source)
if (tm2timestamp(tm, fsec, &tz, &timestamp) != 0)
{
GUC_check_errdetail("timestamp out of range: \"%s\"", str);
GUC_check_errdetail("Timestamp out of range: \"%s\".", str);
return false;
}
}

View File

@ -130,7 +130,8 @@ 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("\"%s\" must be 0 or between %d kB and %d kB.",
"vacuum_buffer_usage_limit",
MIN_BAS_VAC_RING_SIZE_KB, MAX_BAS_VAC_RING_SIZE_KB);
return false;

View File

@ -2478,7 +2478,7 @@ validate_sync_standby_slots(char *rawname, List **elemlist)
if (!slot)
{
GUC_check_errdetail("replication slot \"%s\" does not exist",
GUC_check_errdetail("Replication slot \"%s\" does not exist.",
name);
ok = false;
break;
@ -2486,7 +2486,7 @@ validate_sync_standby_slots(char *rawname, List **elemlist)
if (!SlotIsPhysical(slot))
{
GUC_check_errdetail("\"%s\" is not a physical replication slot",
GUC_check_errdetail("\"%s\" is not a physical replication slot.",
name);
ok = false;
break;

View File

@ -1010,7 +1010,8 @@ check_synchronous_standby_names(char **newval, void **extra, GucSource source)
if (syncrep_parse_error_msg)
GUC_check_errdetail("%s", syncrep_parse_error_msg);
else
GUC_check_errdetail("\"synchronous_standby_names\" parser failed");
GUC_check_errdetail("\"%s\" parser failed.",
"synchronous_standby_names");
return false;
}

View File

@ -3985,7 +3985,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
if (!SplitGUCList(rawstring, ',', &elemlist))
{
GUC_check_errdetail("Invalid list syntax in parameter \"%s\"",
GUC_check_errdetail("Invalid list syntax in parameter \"%s\".",
"debug_io_direct");
pfree(rawstring);
list_free(elemlist);
@ -4005,7 +4005,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
flags |= IO_DIRECT_WAL_INIT;
else
{
GUC_check_errdetail("Invalid option \"%s\"", item);
GUC_check_errdetail("Invalid option \"%s\".", item);
result = false;
break;
}
@ -4018,7 +4018,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
#if XLOG_BLCKSZ < PG_IO_ALIGN_SIZE
if (result && (flags & (IO_DIRECT_WAL | IO_DIRECT_WAL_INIT)))
{
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small",
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small.",
"debug_io_direct", "XLOG_BLCKSZ");
result = false;
}
@ -4026,7 +4026,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
#if BLCKSZ < PG_IO_ALIGN_SIZE
if (result && (flags & IO_DIRECT_DATA))
{
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small",
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small.",
"debug_io_direct", "BLCKSZ");
result = false;
}

View File

@ -2183,7 +2183,7 @@ check_backtrace_functions(char **newval, void **extra, GucSource source)
", \n\t");
if (validlen != newvallen)
{
GUC_check_errdetail("Invalid character");
GUC_check_errdetail("Invalid character.");
return false;
}