Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1b53f1

Browse files
committed
Message fixes and style improvements
1 parentb380484 commitb1b53f1

File tree

24 files changed

+92
-89
lines changed

24 files changed

+92
-89
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -681,11 +681,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
681681
read_rate,write_rate);
682682
appendStringInfo(&buf,_("system usage: %s\n"),pg_rusage_show(&ru0));
683683
appendStringInfo(&buf,
684-
_("WAL usage: %ld records, %ld full page images, "
685-
UINT64_FORMAT" bytes"),
684+
_("WAL usage: %ld records, %ld full page images, %llu bytes"),
686685
walusage.wal_records,
687686
walusage.wal_fpi,
688-
walusage.wal_bytes);
687+
(unsigned long long)walusage.wal_bytes);
689688

690689
ereport(LOG,
691690
(errmsg_internal("%s",buf.data)));
@@ -3488,9 +3487,10 @@ parallel_vacuum_main(dsm_segment *seg, shm_toc *toc)
34883487
false);
34893488
elevel=lvshared->elevel;
34903489

3491-
ereport(DEBUG1,
3492-
(errmsg("starting parallel vacuum worker for %s",
3493-
lvshared->for_cleanup ?"cleanup" :"bulk delete")));
3490+
if (lvshared->for_cleanup)
3491+
elog(DEBUG1,"starting parallel vacuum worker for cleanup");
3492+
else
3493+
elog(DEBUG1,"starting parallel vacuum worker for bulk delete");
34943494

34953495
/* Set debug_query_string for individual workers */
34963496
sharedquery=shm_toc_lookup(toc,PARALLEL_VACUUM_KEY_QUERY_TEXT, false);

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12515,7 +12515,7 @@ StartupRequestWalReceiverRestart(void)
1251512515
if (currentSource==XLOG_FROM_STREAM&&WalRcvRunning())
1251612516
{
1251712517
ereport(LOG,
12518-
(errmsg("wal receiver process shutdown requested")));
12518+
(errmsg("WAL receiver process shutdown requested")));
1251912519

1252012520
pendingWalRcvRestart= true;
1252112521
}

‎src/backend/commands/opclasscmds.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,23 +1156,23 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid,
11561156
(OidIsValid(member->righttype)&&member->righttype!=typeoid))
11571157
ereport(ERROR,
11581158
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1159-
errmsg("associated data types foropclass options parsing functions must match opclass input type")));
1159+
errmsg("associated data types foroperator class options parsing functions must match opclass input type")));
11601160
}
11611161
else
11621162
{
11631163
if (member->lefttype!=member->righttype)
11641164
ereport(ERROR,
11651165
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1166-
errmsg("left and right associated data types foropclass options parsing functions must match")));
1166+
errmsg("left and right associated data types foroperator class options parsing functions must match")));
11671167
}
11681168

11691169
if (procform->prorettype!=VOIDOID||
11701170
procform->pronargs!=1||
11711171
procform->proargtypes.values[0]!=INTERNALOID)
11721172
ereport(ERROR,
11731173
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1174-
errmsg("invalidopclass options parsing function"),
1175-
errhint("Valid signature ofopclassoptions parsing function is'%s'.",
1174+
errmsg("invalidoperator class options parsing function"),
1175+
errhint("Valid signature ofoperator classoptions parsing function is%s.",
11761176
"(internal) RETURNS void")));
11771177
}
11781178

‎src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6853,7 +6853,7 @@ NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr)
68536853
if (ConstraintImpliedByRelConstraint(rel, list_make1(nnulltest), NIL))
68546854
{
68556855
ereport(DEBUG1,
6856-
(errmsg("existing constraints on column \"%s\".\"%s\" are sufficient to prove that it does not contain nulls",
6856+
(errmsg("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
68576857
RelationGetRelationName(rel), NameStr(attr->attname))));
68586858
return true;
68596859
}

‎src/backend/libpq/hba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,10 +1722,10 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
17221722
{
17231723
ereport(elevel,
17241724
(errcode(ERRCODE_CONFIG_FILE_ERROR),
1725-
errmsg("clientcertcan not be set to \"no-verify\" when using \"cert\" authentication"),
1725+
errmsg("clientcertcannot be set to \"no-verify\" when using \"cert\" authentication"),
17261726
errcontext("line %d of configuration file \"%s\"",
17271727
line_num,HbaFileName)));
1728-
*err_msg="clientcertcan not be set to \"no-verify\" when using \"cert\" authentication";
1728+
*err_msg="clientcertcannot be set to \"no-verify\" when using \"cert\" authentication";
17291729
return false;
17301730
}
17311731
hbaline->clientcert=clientCertOff;

‎src/backend/nodes/params.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ ParamsErrorCallback(void *arg)
356356
return;
357357

358358
if (data->portalName&&data->portalName[0]!='\0')
359-
errcontext("extended query \"%s\" with parameters: %s",
359+
errcontext("portal \"%s\" with parameters: %s",
360360
data->portalName,data->params->paramValuesStr);
361361
else
362-
errcontext("extended query with parameters: %s",
362+
errcontext("unnamed portal with parameters: %s",
363363
data->params->paramValuesStr);
364364
}

‎src/backend/parser/gram.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16161,7 +16161,7 @@ insertSelectOptions(SelectStmt *stmt,
1616116161
if (!stmt->sortClause && limitClause->limitOption == LIMIT_OPTION_WITH_TIES)
1616216162
ereport(ERROR,
1616316163
(errcode(ERRCODE_SYNTAX_ERROR),
16164-
errmsg("WITH TIESoptions can not be specified without ORDER BY clause")));
16164+
errmsg("WITH TIEScannot be specified without ORDER BY clause")));
1616516165
stmt->limitOption = limitClause->limitOption;
1616616166
}
1616716167
if (withClause)

‎src/backend/parser/parse_clause.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,7 @@ transformLimitClause(ParseState *pstate, Node *clause,
17701770
IsA(clause,A_Const)&& ((A_Const*)clause)->val.type==T_Null)
17711771
ereport(ERROR,
17721772
(errcode(ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
1773-
errmsg("row count cannot beNULL in FETCH FIRST ... WITH TIES clause")));
1773+
errmsg("row count cannot benull in FETCH FIRST ... WITH TIES clause")));
17741774

17751775
returnqual;
17761776
}

‎src/backend/replication/basebackup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,10 @@ perform_base_backup(basebackup_options *opt)
721721
{
722722
if (total_checksum_failures>1)
723723
ereport(WARNING,
724-
(errmsg("%lld total checksum verification failures",total_checksum_failures)));
724+
(errmsg_plural("%lld total checksum verification failure",
725+
"%lld total checksum verification failures",
726+
total_checksum_failures,
727+
total_checksum_failures)));
725728

726729
ereport(ERROR,
727730
(errcode(ERRCODE_DATA_CORRUPTED),

‎src/backend/storage/ipc/procarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3011,7 +3011,7 @@ TerminateOtherDBBackends(Oid databaseId)
30113011
if (nprepared>0)
30123012
ereport(ERROR,
30133013
(errcode(ERRCODE_OBJECT_IN_USE),
3014-
errmsg("database \"%s\" is being used by preparedtransaction",
3014+
errmsg("database \"%s\" is being used by preparedtransactions",
30153015
get_database_name(databaseId)),
30163016
errdetail_plural("There is %d prepared transaction using the database.",
30173017
"There are %d prepared transactions using the database.",

‎src/backend/utils/adt/jsonpath_exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,9 +2587,9 @@ checkTimezoneIsUsedForCast(bool useTz, const char *type1, const char *type2)
25872587
if (!useTz)
25882588
ereport(ERROR,
25892589
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2590-
errmsg("cannot convert value from %s to %s withouttimezone usage",
2590+
errmsg("cannot convert value from %s to %s withouttime zone usage",
25912591
type1,type2),
2592-
errhint("Use *_tz() function fortimezone support.")));
2592+
errhint("Use *_tz() function fortime zone support.")));
25932593
}
25942594

25952595
/* Convert time datum to timetz datum */

‎src/backend/utils/fmgr/fmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ get_fn_opclass_options(FmgrInfo *flinfo)
20002000

20012001
ereport(ERROR,
20022002
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2003-
errmsg("opclass options info is absent in function call context")));
2003+
errmsg("operator class options info is absent in function call context")));
20042004

20052005
returnNULL;
20062006
}

‎src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,7 +2830,7 @@ static struct config_int ConfigureNamesInt[] =
28302830
gettext_noop("Sets the minimum execution time above which "
28312831
"a sample of statements will be logged."
28322832
" Sampling is determined by log_statement_sample_rate."),
2833-
gettext_noop("Zerolog a sample of all queries. -1 turns this feature off."),
2833+
gettext_noop("Zerologs a sample of all queries. -1 turns this feature off."),
28342834
GUC_UNIT_MS
28352835
},
28362836
&log_min_duration_sample,
@@ -3682,7 +3682,7 @@ static struct config_string ConfigureNamesString[] =
36823682

36833683
{
36843684
{"restore_command",PGC_POSTMASTER,WAL_ARCHIVE_RECOVERY,
3685-
gettext_noop("Sets the shell command that will retrieve an archived WAL file."),
3685+
gettext_noop("Sets the shell command that willbe called toretrieve an archived WAL file."),
36863686
NULL
36873687
},
36883688
&recoveryRestoreCommand,

‎src/backend/utils/sort/sharedtuplestore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ sts_parallel_scan_next(SharedTuplestoreAccessor *accessor, void *meta_data)
566566
if (BufFileSeekBlock(accessor->read_file,read_page)!=0)
567567
ereport(ERROR,
568568
(errcode_for_file_access(),
569-
errmsg("could not seek block %u in shared tuplestore temporary file",
569+
errmsg("could not seektoblock %u in shared tuplestore temporary file",
570570
read_page)));
571571
nread=BufFileRead(accessor->read_file,&chunk_header,
572572
STS_CHUNK_HEADER_SIZE);

‎src/bin/pg_verifybackup/parse_manifest.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ json_manifest_object_field_start(void *state, char *fname, bool isnull)
325325

326326
/* It's not a field we recognize. */
327327
json_manifest_parse_failure(parse->context,
328-
"unknown toplevel field");
328+
"unrecognized top-level field");
329329
break;
330330

331331
caseJM_EXPECT_THIS_FILE_FIELD:
@@ -358,7 +358,7 @@ json_manifest_object_field_start(void *state, char *fname, bool isnull)
358358
parse->wal_range_field=JMWRF_END_LSN;
359359
else
360360
json_manifest_parse_failure(parse->context,
361-
"unexpectedwal range field");
361+
"unexpectedWAL range field");
362362
parse->state=JM_EXPECT_THIS_WAL_RANGE_VALUE;
363363
break;
364364

@@ -469,10 +469,10 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
469469

470470
/* Pathname and size are required. */
471471
if (parse->pathname==NULL&&parse->encoded_pathname==NULL)
472-
json_manifest_parse_failure(parse->context,"missingpathname");
472+
json_manifest_parse_failure(parse->context,"missingpath name");
473473
if (parse->pathname!=NULL&&parse->encoded_pathname!=NULL)
474474
json_manifest_parse_failure(parse->context,
475-
"bothpathnameand encodedpathname");
475+
"bothpath nameand encodedpath name");
476476
if (parse->size==NULL)
477477
json_manifest_parse_failure(parse->context,"missing size");
478478
if (parse->algorithm==NULL&&parse->checksum!=NULL)
@@ -491,7 +491,7 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
491491
parse->encoded_pathname,
492492
raw_length))
493493
json_manifest_parse_failure(parse->context,
494-
"unable to decodefilename");
494+
"could not decodefile name");
495495
parse->pathname[raw_length]='\0';
496496
pfree(parse->encoded_pathname);
497497
parse->encoded_pathname=NULL;
@@ -582,10 +582,10 @@ json_manifest_finalize_wal_range(JsonManifestParseState *parse)
582582
"timeline is not an integer");
583583
if (!parse_xlogrecptr(&start_lsn,parse->start_lsn))
584584
json_manifest_parse_failure(parse->context,
585-
"unable to parse start LSN");
585+
"could not parse start LSN");
586586
if (!parse_xlogrecptr(&end_lsn,parse->end_lsn))
587587
json_manifest_parse_failure(parse->context,
588-
"unable to parse end LSN");
588+
"could not parse end LSN");
589589

590590
/* Invoke the callback with the details we've gathered. */
591591
context->perwalrange_cb(context,tli,start_lsn,end_lsn);

‎src/bin/pg_verifybackup/pg_verifybackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ record_manifest_details_for_file(JsonManifestParseContext *context,
471471
/* Make a new entry in the hash table for this file. */
472472
m=manifest_files_insert(ht,pathname,&found);
473473
if (found)
474-
report_fatal_error("duplicatepathname in backup manifest: \"%s\"",
474+
report_fatal_error("duplicatepath name in backup manifest: \"%s\"",
475475
pathname);
476476

477477
/* Initialize the entry. */

‎src/bin/pg_verifybackup/t/005_bad_manifest.pl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@
3838
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": true}
3939
EOM
4040

41-
test_parse_error('unknown toplevel field',<<EOM);
41+
test_parse_error('unrecognized top-level field',<<EOM);
4242
{"PostgreSQL-Backup-Manifest-Version": 1, "Oops": 1}
4343
EOM
4444

4545
test_parse_error('unexpected object start',<<EOM);
4646
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": {}}
4747
EOM
4848

49-
test_parse_error('missingpathname',<<EOM);
49+
test_parse_error('missingpath name',<<EOM);
5050
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [{}]}
5151
EOM
5252

53-
test_parse_error('bothpathnameand encodedpathname',<<EOM);
53+
test_parse_error('bothpath nameand encodedpath name',<<EOM);
5454
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
5555
{"Path": "x", "Encoded-Path": "1234"}
5656
]}
@@ -74,13 +74,13 @@
7474
]}
7575
EOM
7676

77-
test_parse_error('unable to decodefilename',<<EOM);
77+
test_parse_error('could not decodefile name',<<EOM);
7878
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
7979
{"Encoded-Path": "123", "Size": 0}
8080
]}
8181
EOM
8282

83-
test_fatal_error('duplicatepathname in backup manifest',<<EOM);
83+
test_fatal_error('duplicatepath name in backup manifest',<<EOM);
8484
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
8585
{"Path": "x", "Size": 0},
8686
{"Path": "x", "Size": 0}
@@ -117,7 +117,7 @@
117117
]}
118118
EOM
119119

120-
test_parse_error('unexpectedwal range field',<<EOM);
120+
test_parse_error('unexpectedWAL range field',<<EOM);
121121
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
122122
{"Oops": 1}
123123
]}
@@ -141,13 +141,13 @@
141141
]}
142142
EOM
143143

144-
test_parse_error('unable to parse start LSN',<<EOM);
144+
test_parse_error('could not parse start LSN',<<EOM);
145145
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
146146
{"Timeline": 1, "Start-LSN": "oops", "End-LSN": "0/0"}
147147
]}
148148
EOM
149149

150-
test_parse_error('unable to parse end LSN',<<EOM);
150+
test_parse_error('could not parse end LSN',<<EOM);
151151
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
152152
{"Timeline": 1, "Start-LSN": "0/0", "End-LSN": "oops"}
153153
]}

‎src/bin/pgbench/t/001_pgbench_with_server.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ sub pgbench
287287
[],
288288
[
289289
qr{ERROR: invalid input syntax for type json},
290-
qr{(?!extended query with parameters)}
290+
qr{(?!unnamed portal with parameters)}
291291
],
292292
'server parameter logging',
293293
{
@@ -314,7 +314,7 @@ sub pgbench
314314
[],
315315
[
316316
qr{ERROR: division by zero},
317-
qr{CONTEXT:extended query with parameters:\$1 = '1',\$2 = NULL}
317+
qr{CONTEXT:unnamed portal with parameters:\$1 = '1',\$2 = NULL}
318318
],
319319
'server parameter logging',
320320
{
@@ -328,7 +328,7 @@ sub pgbench
328328
[],
329329
[
330330
qr{ERROR: invalid input syntax for type json},
331-
qr[CONTEXT: JSON data, line 1:\{ invalid\.\.\.[\r\n]+extended query with parameters:\$1 = '\{ invalid ',\$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que\.\.\.']m
331+
qr[CONTEXT: JSON data, line 1:\{ invalid\.\.\.[\r\n]+unnamed portal with parameters:\$1 = '\{ invalid ',\$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que\.\.\.']m
332332
],
333333
'server parameter logging',
334334
{
@@ -356,7 +356,7 @@ sub pgbench
356356
[],
357357
[
358358
qr{ERROR: division by zero},
359-
qr{CONTEXT:extended query with parameters:\$1 = '1',\$2 = NULL}
359+
qr{CONTEXT:unnamed portal with parameters:\$1 = '1',\$2 = NULL}
360360
],
361361
'server parameter logging',
362362
{
@@ -373,7 +373,7 @@ sub pgbench
373373
[],
374374
[
375375
qr{ERROR: invalid input syntax for type json},
376-
qr[CONTEXT: JSON data, line 1:\{ invalid\.\.\.[\r\n]+extended query with parameters:\$1 = '\{ invalid ',\$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que mirase bien lo que hacia\?']m
376+
qr[CONTEXT: JSON data, line 1:\{ invalid\.\.\.[\r\n]+unnamed portal with parameters:\$1 = '\{ invalid ',\$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que mirase bien lo que hacia\?']m
377377
],
378378
'server parameter logging',
379379
{

‎src/bin/scripts/vacuumdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ main(int argc, char *argv[])
281281
}
282282
if (vacopts.full)
283283
{
284-
pg_log_error("cannot use the \"%s\" option when performing full",
284+
pg_log_error("cannot use the \"%s\" option when performing full vacuum",
285285
"parallel");
286286
exit(1);
287287
}

‎src/fe_utils/archive.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RestoreArchivedFile(const char *path, const char *xlogfname,
5050
xlogfname,NULL);
5151
if (xlogRestoreCmd==NULL)
5252
{
53-
pg_log_fatal("could notuse restore_command with %%ralias");
53+
pg_log_fatal("cannotuse restore_command with %%rplaceholder");
5454
exit(1);
5555
}
5656

@@ -109,7 +109,7 @@ RestoreArchivedFile(const char *path, const char *xlogfname,
109109
*/
110110
if (wait_result_is_any_signal(rc, true))
111111
{
112-
pg_log_fatal("restore_command failed due to the signal: %s",
112+
pg_log_fatal("restore_command failed: %s",
113113
wait_result_to_str(rc));
114114
exit(1);
115115
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp