Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8d9978a

Browse files
committed
Apply quotes more consistently to GUC names in logs
Quotes are applied to GUCs in a very inconsistent way across the code base, with a mix of double quotes or no quotes used. This commit removes double quotes around all the GUC names that are obviously referred to as parameters with non-English words (use of underscore, mixed case, etc). This is the result of a discussion with Álvaro Herrera, Nathan Bossart, Laurenz Albe, Peter Eisentraut, Tom Lane and Daniel Gustafsson. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com
1 parent 334f512 commit 8d9978a

File tree

22 files changed

+41
-41
lines changed

22 files changed

+41
-41
lines changed

contrib/pg_prewarm/autoprewarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ apw_start_database_worker(void)
877877
ereport(ERROR,
878878
(errcode(ERRCODE_INSUFFICIENT_RESOURCES),
879879
errmsg("registering dynamic bgworker autoprewarm failed"),
880-
errhint("Consider increasing configuration parameter \"max_worker_processes\".")));
880+
errhint("Consider increasing configuration parameter max_worker_processes.")));
881881

882882
/*
883883
* Ignore return value; if it fails, postmaster has died, but we have

src/backend/access/heap/vacuumlazy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel)
26582658
vacrel->dbname, vacrel->relnamespace, vacrel->relname,
26592659
vacrel->num_index_scans),
26602660
errdetail("The table's relfrozenxid or relminmxid is too far in the past."),
2661-
errhint("Consider increasing configuration parameter \"maintenance_work_mem\" or \"autovacuum_work_mem\".\n"
2661+
errhint("Consider increasing configuration parameter maintenance_work_mem or autovacuum_work_mem.\n"
26622662
"You might also need to consider other ways for VACUUM to keep up with the allocation of transaction IDs.")));
26632663

26642664
/* Stop applying cost limits from this point on */

src/backend/access/transam/commit_ts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ error_commit_ts_disabled(void)
385385
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
386386
errmsg("could not get commit timestamp data"),
387387
RecoveryInProgress() ?
388-
errhint("Make sure the configuration parameter \"%s\" is set on the primary server.",
388+
errhint("Make sure the configuration parameter %s is set on the primary server.",
389389
"track_commit_timestamp") :
390-
errhint("Make sure the configuration parameter \"%s\" is set.",
390+
errhint("Make sure the configuration parameter %s is set.",
391391
"track_commit_timestamp")));
392392
}
393393

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4258,11 +4258,11 @@ ReadControlFile(void)
42584258
/* check and update variables dependent on wal_segment_size */
42594259
if (ConvertToXSegs(min_wal_size_mb, wal_segment_size) < 2)
42604260
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
4261-
errmsg("\"min_wal_size\" must be at least twice \"wal_segment_size\"")));
4261+
errmsg("min_wal_size must be at least twice wal_segment_size")));
42624262

42634263
if (ConvertToXSegs(max_wal_size_mb, wal_segment_size) < 2)
42644264
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
4265-
errmsg("\"max_wal_size\" must be at least twice \"wal_segment_size\"")));
4265+
errmsg("max_wal_size must be at least twice wal_segment_size")));
42664266

42674267
UsableBytesInSegment =
42684268
(wal_segment_size / XLOG_BLCKSZ * UsableBytesInPage) -

src/backend/commands/vacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ check_vacuum_buffer_usage_limit(int *newval, void **extra,
134134
return true;
135135

136136
/* Value does not fall within any allowable range */
137-
GUC_check_errdetail("\"vacuum_buffer_usage_limit\" must be 0 or between %d kB and %d kB",
137+
GUC_check_errdetail("vacuum_buffer_usage_limit must be 0 or between %d kB and %d kB",
138138
MIN_BAS_VAC_RING_SIZE_KB, MAX_BAS_VAC_RING_SIZE_KB);
139139

140140
return false;

src/backend/commands/variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ check_client_encoding(char **newval, void **extra, GucSource source)
717717
else
718718
{
719719
/* Provide a useful complaint */
720-
GUC_check_errdetail("Cannot change \"client_encoding\" now.");
720+
GUC_check_errdetail("Cannot change client_encoding now.");
721721
}
722722
return false;
723723
}

src/backend/libpq/be-secure-openssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ be_tls_init(bool isServerStart)
195195
{
196196
ereport(isServerStart ? FATAL : LOG,
197197
/*- translator: first %s is a GUC option name, second %s is its value */
198-
(errmsg("\"%s\" setting \"%s\" not supported by this build",
198+
(errmsg("%s setting \"%s\" not supported by this build",
199199
"ssl_min_protocol_version",
200200
GetConfigOption("ssl_min_protocol_version",
201201
false, false))));
@@ -218,7 +218,7 @@ be_tls_init(bool isServerStart)
218218
{
219219
ereport(isServerStart ? FATAL : LOG,
220220
/*- translator: first %s is a GUC option name, second %s is its value */
221-
(errmsg("\"%s\" setting \"%s\" not supported by this build",
221+
(errmsg("%s setting \"%s\" not supported by this build",
222222
"ssl_max_protocol_version",
223223
GetConfigOption("ssl_max_protocol_version",
224224
false, false))));
@@ -245,7 +245,7 @@ be_tls_init(bool isServerStart)
245245
{
246246
ereport(isServerStart ? FATAL : LOG,
247247
(errmsg("could not set SSL protocol version range"),
248-
errdetail("\"%s\" cannot be higher than \"%s\"",
248+
errdetail("%s cannot be higher than %s",
249249
"ssl_min_protocol_version",
250250
"ssl_max_protocol_version")));
251251
goto error;

src/backend/postmaster/bgworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker)
944944
"Up to %d background workers can be registered with the current settings.",
945945
max_worker_processes,
946946
max_worker_processes),
947-
errhint("Consider increasing the configuration parameter \"max_worker_processes\".")));
947+
errhint("Consider increasing the configuration parameter max_worker_processes.")));
948948
return;
949949
}
950950

src/backend/postmaster/checkpointer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ CheckpointerMain(void)
423423
"checkpoints are occurring too frequently (%d seconds apart)",
424424
elapsed_secs,
425425
elapsed_secs),
426-
errhint("Consider increasing the configuration parameter \"max_wal_size\".")));
426+
errhint("Consider increasing the configuration parameter max_wal_size.")));
427427

428428
/*
429429
* Initialize checkpointer-private variables used during

src/backend/postmaster/pgarch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ HandlePgArchInterrupts(void)
807807
*/
808808
ereport(LOG,
809809
(errmsg("restarting archiver process because value of "
810-
"\"archive_library\" was changed")));
810+
"archive_library was changed")));
811811

812812
proc_exit(0);
813813
}

src/backend/storage/buffer/localbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ check_temp_buffers(int *newval, void **extra, GucSource source)
705705
*/
706706
if (source != PGC_S_TEST && NLocBuffer && NLocBuffer != *newval)
707707
{
708-
GUC_check_errdetail("\"temp_buffers\" cannot be changed after any temporary tables have been accessed in the session.");
708+
GUC_check_errdetail("temp_buffers cannot be changed after any temporary tables have been accessed in the session.");
709709
return false;
710710
}
711711
return true;

src/backend/storage/file/fd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3931,7 +3931,7 @@ check_debug_io_direct(char **newval, void **extra, GucSource source)
39313931

39323932
if (!SplitGUCList(rawstring, ',', &elemlist))
39333933
{
3934-
GUC_check_errdetail("invalid list syntax in parameter \"%s\"",
3934+
GUC_check_errdetail("invalid list syntax in parameter %s",
39353935
"debug_io_direct");
39363936
pfree(rawstring);
39373937
list_free(elemlist);

src/backend/storage/lmgr/predicate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ GetSerializableTransactionSnapshot(Snapshot snapshot)
16441644
ereport(ERROR,
16451645
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
16461646
errmsg("cannot use serializable mode in a hot standby"),
1647-
errdetail("\"default_transaction_isolation\" is set to \"serializable\"."),
1647+
errdetail("default_transaction_isolation is set to \"serializable\"."),
16481648
errhint("You can use \"SET default_transaction_isolation = 'repeatable read'\" to change the default.")));
16491649

16501650
/*

src/backend/tcop/postgres.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3524,7 +3524,7 @@ check_stack_depth(void)
35243524
ereport(ERROR,
35253525
(errcode(ERRCODE_STATEMENT_TOO_COMPLEX),
35263526
errmsg("stack depth limit exceeded"),
3527-
errhint("Increase the configuration parameter \"max_stack_depth\" (currently %dkB), "
3527+
errhint("Increase the configuration parameter max_stack_depth (currently %dkB), "
35283528
"after ensuring the platform's stack depth limit is adequate.",
35293529
max_stack_depth)));
35303530
}
@@ -3571,7 +3571,7 @@ check_max_stack_depth(int *newval, void **extra, GucSource source)
35713571

35723572
if (stack_rlimit > 0 && newval_bytes > stack_rlimit - STACK_DEPTH_SLOP)
35733573
{
3574-
GUC_check_errdetail("\"max_stack_depth\" must not exceed %ldkB.",
3574+
GUC_check_errdetail("max_stack_depth must not exceed %ldkB.",
35753575
(stack_rlimit - STACK_DEPTH_SLOP) / 1024L);
35763576
GUC_check_errhint("Increase the platform's stack depth limit via \"ulimit -s\" or local equivalent.");
35773577
return false;
@@ -3632,9 +3632,9 @@ check_log_stats(bool *newval, void **extra, GucSource source)
36323632
if (*newval &&
36333633
(log_parser_stats || log_planner_stats || log_executor_stats))
36343634
{
3635-
GUC_check_errdetail("Cannot enable \"log_statement_stats\" when "
3636-
"\"log_parser_stats\", \"log_planner_stats\", "
3637-
"or \"log_executor_stats\" is true.");
3635+
GUC_check_errdetail("Cannot enable log_statement_stats when "
3636+
"log_parser_stats, log_planner_stats, "
3637+
"or log_executor_stats is true.");
36383638
return false;
36393639
}
36403640
return true;

src/backend/utils/adt/pg_locale.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,7 +2875,7 @@ icu_validate_locale(const char *loc_str)
28752875
ereport(elevel,
28762876
(errmsg("could not get language from ICU locale \"%s\": %s",
28772877
loc_str, u_errorName(status)),
2878-
errhint("To disable ICU locale validation, set the parameter \"%s\" to \"%s\".",
2878+
errhint("To disable ICU locale validation, set the parameter %s to \"%s\".",
28792879
"icu_validation_level", "disabled")));
28802880
return;
28812881
}
@@ -2904,7 +2904,7 @@ icu_validate_locale(const char *loc_str)
29042904
ereport(elevel,
29052905
(errmsg("ICU locale \"%s\" has unknown language \"%s\"",
29062906
loc_str, lang),
2907-
errhint("To disable ICU locale validation, set the parameter \"%s\" to \"%s\".",
2907+
errhint("To disable ICU locale validation, set the parameter %s to \"%s\".",
29082908
"icu_validation_level", "disabled")));
29092909

29102910
/* check that it can be opened */

src/backend/utils/fmgr/dfmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ find_in_dynamic_libpath(const char *basename)
555555
if (piece == p)
556556
ereport(ERROR,
557557
(errcode(ERRCODE_INVALID_NAME),
558-
errmsg("zero-length component in parameter \"dynamic_library_path\"")));
558+
errmsg("zero-length component in parameter dynamic_library_path")));
559559

560560
if (piece == NULL)
561561
len = strlen(p);
@@ -574,7 +574,7 @@ find_in_dynamic_libpath(const char *basename)
574574
if (!is_absolute_path(mangled))
575575
ereport(ERROR,
576576
(errcode(ERRCODE_INVALID_NAME),
577-
errmsg("component in parameter \"dynamic_library_path\" is not an absolute path")));
577+
errmsg("component in parameter dynamic_library_path is not an absolute path")));
578578

579579
full = palloc(strlen(mangled) + 1 + baselen + 1);
580580
sprintf(full, "%s/%s", mangled, basename);

src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ SelectConfigFiles(const char *userDoption, const char *progname)
18731873
else
18741874
{
18751875
write_stderr("%s does not know where to find the database system data.\n"
1876-
"This can be specified as \"data_directory\" in \"%s\", "
1876+
"This can be specified as data_directory in \"%s\", "
18771877
"or by the -D invocation option, or by the "
18781878
"PGDATA environment variable.\n",
18791879
progname, ConfigFileName);

src/backend/utils/misc/guc_tables.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3821,7 +3821,7 @@ struct config_string ConfigureNamesString[] =
38213821
{
38223822
{"archive_command", PGC_SIGHUP, WAL_ARCHIVING,
38233823
gettext_noop("Sets the shell command that will be called to archive a WAL file."),
3824-
gettext_noop("This is used only if \"archive_library\" is not set.")
3824+
gettext_noop("This is used only if archive_library is not set.")
38253825
},
38263826
&XLogArchiveCommand,
38273827
"",
@@ -3831,7 +3831,7 @@ struct config_string ConfigureNamesString[] =
38313831
{
38323832
{"archive_library", PGC_SIGHUP, WAL_ARCHIVING,
38333833
gettext_noop("Sets the library that will be called to archive a WAL file."),
3834-
gettext_noop("An empty string indicates that \"archive_command\" should be used.")
3834+
gettext_noop("An empty string indicates that archive_command should be used.")
38353835
},
38363836
&XLogArchiveLibrary,
38373837
"",

src/test/modules/commit_ts/expected/commit_timestamp_1.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SELECT id,
1818
FROM committs_test
1919
ORDER BY id;
2020
ERROR: could not get commit timestamp data
21-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
21+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
2222
DROP TABLE committs_test;
2323
SELECT pg_xact_commit_timestamp('0'::xid);
2424
ERROR: cannot retrieve commit timestamp for transaction 0
@@ -40,7 +40,7 @@ SELECT x.xid::text::bigint > 0 as xid_valid,
4040
roident != 0 AS valid_roident
4141
FROM pg_last_committed_xact() x;
4242
ERROR: could not get commit timestamp data
43-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
43+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
4444
-- Test non-normal transaction ids.
4545
SELECT * FROM pg_xact_commit_timestamp_origin(NULL); -- ok, NULL
4646
timestamp | roident
@@ -69,13 +69,13 @@ SELECT x.timestamp > '-infinity'::timestamptz AS ts_low,
6969
roident != 0 AS valid_roident
7070
FROM pg_last_committed_xact() x;
7171
ERROR: could not get commit timestamp data
72-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
72+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
7373
SELECT x.timestamp > '-infinity'::timestamptz AS ts_low,
7474
x.timestamp <= now() AS ts_high,
7575
roident != 0 AS valid_roident
7676
FROM pg_xact_commit_timestamp_origin(:'txid_no_origin') x;
7777
ERROR: could not get commit timestamp data
78-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
78+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
7979
-- Test transaction with replication origin
8080
SELECT pg_replication_origin_create('regress_commit_ts: get_origin') != 0
8181
AS valid_roident;
@@ -97,14 +97,14 @@ SELECT x.timestamp > '-infinity'::timestamptz AS ts_low,
9797
FROM pg_last_committed_xact() x, pg_replication_origin r
9898
WHERE r.roident = x.roident;
9999
ERROR: could not get commit timestamp data
100-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
100+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
101101
SELECT x.timestamp > '-infinity'::timestamptz AS ts_low,
102102
x.timestamp <= now() AS ts_high,
103103
r.roname
104104
FROM pg_xact_commit_timestamp_origin(:'txid_with_origin') x, pg_replication_origin r
105105
WHERE r.roident = x.roident;
106106
ERROR: could not get commit timestamp data
107-
HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
107+
HINT: Make sure the configuration parameter track_commit_timestamp is set.
108108
SELECT pg_replication_origin_session_reset();
109109
pg_replication_origin_session_reset
110110
-------------------------------------

src/test/regress/expected/collate.icu.utf8.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,15 +1042,15 @@ ERROR: parameter "locale" must be specified
10421042
SET icu_validation_level = ERROR;
10431043
CREATE COLLATION testx (provider = icu, locale = 'nonsense-nowhere'); -- fails
10441044
ERROR: ICU locale "nonsense-nowhere" has unknown language "nonsense"
1045-
HINT: To disable ICU locale validation, set the parameter "icu_validation_level" to "disabled".
1045+
HINT: To disable ICU locale validation, set the parameter icu_validation_level to "disabled".
10461046
CREATE COLLATION testx (provider = icu, locale = '@colStrength=primary;nonsense=yes'); -- fails
10471047
ERROR: could not convert locale name "@colStrength=primary;nonsense=yes" to language tag: U_ILLEGAL_ARGUMENT_ERROR
10481048
RESET icu_validation_level;
10491049
CREATE COLLATION testx (provider = icu, locale = '@colStrength=primary;nonsense=yes'); DROP COLLATION testx;
10501050
WARNING: could not convert locale name "@colStrength=primary;nonsense=yes" to language tag: U_ILLEGAL_ARGUMENT_ERROR
10511051
CREATE COLLATION testx (provider = icu, locale = 'nonsense-nowhere'); DROP COLLATION testx;
10521052
WARNING: ICU locale "nonsense-nowhere" has unknown language "nonsense"
1053-
HINT: To disable ICU locale validation, set the parameter "icu_validation_level" to "disabled".
1053+
HINT: To disable ICU locale validation, set the parameter icu_validation_level to "disabled".
10541054
CREATE COLLATION test4 FROM nonsense;
10551055
ERROR: collation "nonsense" for encoding "UTF8" does not exist
10561056
CREATE COLLATION test5 FROM test0;

src/test/regress/expected/json.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ CONTEXT: JSON data, line 1: {"abc":1,3...
219219
SET max_stack_depth = '100kB';
220220
SELECT repeat('[', 10000)::json;
221221
ERROR: stack depth limit exceeded
222-
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
222+
HINT: Increase the configuration parameter max_stack_depth (currently 100kB), after ensuring the platform's stack depth limit is adequate.
223223
SELECT repeat('{"a":', 10000)::json;
224224
ERROR: stack depth limit exceeded
225-
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
225+
HINT: Increase the configuration parameter max_stack_depth (currently 100kB), after ensuring the platform's stack depth limit is adequate.
226226
RESET max_stack_depth;
227227
-- Miscellaneous stuff.
228228
SELECT 'true'::json; -- OK

src/test/regress/expected/jsonb.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ CONTEXT: JSON data, line 1: {"abc":1,3...
213213
SET max_stack_depth = '100kB';
214214
SELECT repeat('[', 10000)::jsonb;
215215
ERROR: stack depth limit exceeded
216-
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
216+
HINT: Increase the configuration parameter max_stack_depth (currently 100kB), after ensuring the platform's stack depth limit is adequate.
217217
SELECT repeat('{"a":', 10000)::jsonb;
218218
ERROR: stack depth limit exceeded
219-
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
219+
HINT: Increase the configuration parameter max_stack_depth (currently 100kB), after ensuring the platform's stack depth limit is adequate.
220220
RESET max_stack_depth;
221221
-- Miscellaneous stuff.
222222
SELECT 'true'::jsonb; -- OK

0 commit comments

Comments
 (0)