Skip to content

Commit 3e0242b

Browse files
committed
Message fixes and style improvements
1 parent ac673a1 commit 3e0242b

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
@@ -677,11 +677,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
677677
read_rate, write_rate);
678678
appendStringInfo(&buf, _("system usage: %s\n"), pg_rusage_show(&ru0));
679679
appendStringInfo(&buf,
680-
_("WAL usage: %ld records, %ld full page images, "
681-
UINT64_FORMAT " bytes"),
680+
_("WAL usage: %ld records, %ld full page images, %llu bytes"),
682681
walusage.wal_records,
683682
walusage.wal_fpi,
684-
walusage.wal_bytes);
683+
(unsigned long long) walusage.wal_bytes);
685684

686685
ereport(LOG,
687686
(errmsg_internal("%s", buf.data)));
@@ -3523,9 +3522,10 @@ parallel_vacuum_main(dsm_segment *seg, shm_toc *toc)
35233522
false);
35243523
elevel = lvshared->elevel;
35253524

3526-
ereport(DEBUG1,
3527-
(errmsg("starting parallel vacuum worker for %s",
3528-
lvshared->for_cleanup ? "cleanup" : "bulk delete")));
3525+
if (lvshared->for_cleanup)
3526+
elog(DEBUG1, "starting parallel vacuum worker for cleanup");
3527+
else
3528+
elog(DEBUG1, "starting parallel vacuum worker for bulk delete");
35293529

35303530
/* Set debug_query_string for individual workers */
35313531
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
@@ -12504,7 +12504,7 @@ StartupRequestWalReceiverRestart(void)
1250412504
if (currentSource == XLOG_FROM_STREAM && WalRcvRunning())
1250512505
{
1250612506
ereport(LOG,
12507-
(errmsg("wal receiver process shutdown requested")));
12507+
(errmsg("WAL receiver process shutdown requested")));
1250812508

1250912509
pendingWalRcvRestart = true;
1251012510
}

src/backend/commands/opclasscmds.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,23 +1212,23 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid,
12121212
(OidIsValid(member->righttype) && member->righttype != typeoid))
12131213
ereport(ERROR,
12141214
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1215-
errmsg("associated data types for opclass options parsing functions must match opclass input type")));
1215+
errmsg("associated data types for operator class options parsing functions must match opclass input type")));
12161216
}
12171217
else
12181218
{
12191219
if (member->lefttype != member->righttype)
12201220
ereport(ERROR,
12211221
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1222-
errmsg("left and right associated data types for opclass options parsing functions must match")));
1222+
errmsg("left and right associated data types for operator class options parsing functions must match")));
12231223
}
12241224

12251225
if (procform->prorettype != VOIDOID ||
12261226
procform->pronargs != 1 ||
12271227
procform->proargtypes.values[0] != INTERNALOID)
12281228
ereport(ERROR,
12291229
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
1230-
errmsg("invalid opclass options parsing function"),
1231-
errhint("Valid signature of opclass options parsing function is '%s'.",
1230+
errmsg("invalid operator class options parsing function"),
1231+
errhint("Valid signature of operator class options parsing function is %s.",
12321232
"(internal) RETURNS void")));
12331233
}
12341234

src/backend/commands/tablecmds.c

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

src/backend/libpq/hba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,10 +1746,10 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
17461746
{
17471747
ereport(elevel,
17481748
(errcode(ERRCODE_CONFIG_FILE_ERROR),
1749-
errmsg("clientcert can not be set to \"no-verify\" when using \"cert\" authentication"),
1749+
errmsg("clientcert cannot be set to \"no-verify\" when using \"cert\" authentication"),
17501750
errcontext("line %d of configuration file \"%s\"",
17511751
line_num, HbaFileName)));
1752-
*err_msg = "clientcert can not be set to \"no-verify\" when using \"cert\" authentication";
1752+
*err_msg = "clientcert cannot be set to \"no-verify\" when using \"cert\" authentication";
17531753
return false;
17541754
}
17551755
hbaline->clientcert = clientCertOff;

src/backend/nodes/params.c

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

416416
if (data->portalName && data->portalName[0] != '\0')
417-
errcontext("extended query \"%s\" with parameters: %s",
417+
errcontext("portal \"%s\" with parameters: %s",
418418
data->portalName, data->params->paramValuesStr);
419419
else
420-
errcontext("extended query with parameters: %s",
420+
errcontext("unnamed portal with parameters: %s",
421421
data->params->paramValuesStr);
422422
}

src/backend/parser/gram.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15919,7 +15919,7 @@ insertSelectOptions(SelectStmt *stmt,
1591915919
if (!stmt->sortClause && limitClause->limitOption == LIMIT_OPTION_WITH_TIES)
1592015920
ereport(ERROR,
1592115921
(errcode(ERRCODE_SYNTAX_ERROR),
15922-
errmsg("WITH TIES options can not be specified without ORDER BY clause")));
15922+
errmsg("WITH TIES cannot be specified without ORDER BY clause")));
1592315923
stmt->limitOption = limitClause->limitOption;
1592415924
}
1592515925
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 be NULL in FETCH FIRST ... WITH TIES clause")));
1773+
errmsg("row count cannot be null in FETCH FIRST ... WITH TIES clause")));
17741774

17751775
return qual;
17761776
}

src/backend/replication/basebackup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,10 @@ perform_base_backup(basebackup_options *opt)
719719
{
720720
if (total_checksum_failures > 1)
721721
ereport(WARNING,
722-
(errmsg("%lld total checksum verification failures", total_checksum_failures)));
722+
(errmsg_plural("%lld total checksum verification failure",
723+
"%lld total checksum verification failures",
724+
total_checksum_failures,
725+
total_checksum_failures)));
723726

724727
ereport(ERROR,
725728
(errcode(ERRCODE_DATA_CORRUPTED),

src/backend/storage/ipc/procarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3627,7 +3627,7 @@ TerminateOtherDBBackends(Oid databaseId)
36273627
if (nprepared > 0)
36283628
ereport(ERROR,
36293629
(errcode(ERRCODE_OBJECT_IN_USE),
3630-
errmsg("database \"%s\" is being used by prepared transaction",
3630+
errmsg("database \"%s\" is being used by prepared transactions",
36313631
get_database_name(databaseId)),
36323632
errdetail_plural("There is %d prepared transaction using the database.",
36333633
"There are %d prepared transactions using the database.",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy