Skip to content

Commit 6ba9892

Browse files
committed
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.
1 parent fd99245 commit 6ba9892

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

Diff for: src/backend/access/transam/slru.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ check_slru_buffers(const char *name, int *newval)
358358
if (*newval % SLRU_BANK_SIZE == 0)
359359
return true;
360360

361-
GUC_check_errdetail("\"%s\" must be a multiple of %d", name,
361+
GUC_check_errdetail("\"%s\" must be a multiple of %d.", name,
362362
SLRU_BANK_SIZE);
363363
return false;
364364
}

Diff for: src/backend/access/transam/xlogrecovery.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4933,7 +4933,7 @@ check_recovery_target_time(char **newval, void **extra, GucSource source)
49334933

49344934
if (tm2timestamp(tm, fsec, &tz, &timestamp) != 0)
49354935
{
4936-
GUC_check_errdetail("timestamp out of range: \"%s\"", str);
4936+
GUC_check_errdetail("Timestamp out of range: \"%s\".", str);
49374937
return false;
49384938
}
49394939
}

Diff for: src/backend/commands/vacuum.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ check_vacuum_buffer_usage_limit(int *newval, void **extra,
130130
return true;
131131

132132
/* Value does not fall within any allowable range */
133-
GUC_check_errdetail("\"vacuum_buffer_usage_limit\" must be 0 or between %d kB and %d kB",
133+
GUC_check_errdetail("\"%s\" must be 0 or between %d kB and %d kB.",
134+
"vacuum_buffer_usage_limit",
134135
MIN_BAS_VAC_RING_SIZE_KB, MAX_BAS_VAC_RING_SIZE_KB);
135136

136137
return false;

Diff for: src/backend/replication/slot.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2478,15 +2478,15 @@ validate_sync_standby_slots(char *rawname, List **elemlist)
24782478

24792479
if (!slot)
24802480
{
2481-
GUC_check_errdetail("replication slot \"%s\" does not exist",
2481+
GUC_check_errdetail("Replication slot \"%s\" does not exist.",
24822482
name);
24832483
ok = false;
24842484
break;
24852485
}
24862486

24872487
if (!SlotIsPhysical(slot))
24882488
{
2489-
GUC_check_errdetail("\"%s\" is not a physical replication slot",
2489+
GUC_check_errdetail("\"%s\" is not a physical replication slot.",
24902490
name);
24912491
ok = false;
24922492
break;

Diff for: src/backend/replication/syncrep.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,8 @@ check_synchronous_standby_names(char **newval, void **extra, GucSource source)
10101010
if (syncrep_parse_error_msg)
10111011
GUC_check_errdetail("%s", syncrep_parse_error_msg);
10121012
else
1013-
GUC_check_errdetail("\"synchronous_standby_names\" parser failed");
1013+
GUC_check_errdetail("\"%s\" parser failed.",
1014+
"synchronous_standby_names");
10141015
return false;
10151016
}
10161017

Diff for: src/backend/storage/file/fd.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -3985,7 +3985,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
39853985

39863986
if (!SplitGUCList(rawstring, ',', &elemlist))
39873987
{
3988-
GUC_check_errdetail("Invalid list syntax in parameter \"%s\"",
3988+
GUC_check_errdetail("Invalid list syntax in parameter \"%s\".",
39893989
"debug_io_direct");
39903990
pfree(rawstring);
39913991
list_free(elemlist);
@@ -4005,7 +4005,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
40054005
flags |= IO_DIRECT_WAL_INIT;
40064006
else
40074007
{
4008-
GUC_check_errdetail("Invalid option \"%s\"", item);
4008+
GUC_check_errdetail("Invalid option \"%s\".", item);
40094009
result = false;
40104010
break;
40114011
}
@@ -4018,15 +4018,15 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
40184018
#if XLOG_BLCKSZ < PG_IO_ALIGN_SIZE
40194019
if (result && (flags & (IO_DIRECT_WAL | IO_DIRECT_WAL_INIT)))
40204020
{
4021-
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small",
4021+
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small.",
40224022
"debug_io_direct", "XLOG_BLCKSZ");
40234023
result = false;
40244024
}
40254025
#endif
40264026
#if BLCKSZ < PG_IO_ALIGN_SIZE
40274027
if (result && (flags & IO_DIRECT_DATA))
40284028
{
4029-
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small",
4029+
GUC_check_errdetail("\"%s\" is not supported for WAL because %s is too small.",
40304030
"debug_io_direct", "BLCKSZ");
40314031
result = false;
40324032
}

Diff for: src/backend/utils/error/elog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ check_backtrace_functions(char **newval, void **extra, GucSource source)
21832183
", \n\t");
21842184
if (validlen != newvallen)
21852185
{
2186-
GUC_check_errdetail("Invalid character");
2186+
GUC_check_errdetail("Invalid character.");
21872187
return false;
21882188
}
21892189

0 commit comments

Comments
 (0)