Skip to content

Commit b1b53f1

Browse files
committed
Message fixes and style improvements
1 parent b380484 commit b1b53f1

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 for opclass options parsing functions must match opclass input type")));
1159+
errmsg("associated data types for operator 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 for opclass options parsing functions must match")));
1166+
errmsg("left and right associated data types for operator 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("invalid opclass options parsing function"),
1175-
errhint("Valid signature of opclass options parsing function is '%s'.",
1174+
errmsg("invalid operator class options parsing function"),
1175+
errhint("Valid signature of operator class options 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("clientcert can not be set to \"no-verify\" when using \"cert\" authentication"),
1725+
errmsg("clientcert cannot be set to \"no-verify\" when using \"cert\" authentication"),
17261726
errcontext("line %d of configuration file \"%s\"",
17271727
line_num, HbaFileName)));
1728-
*err_msg = "clientcert can not be set to \"no-verify\" when using \"cert\" authentication";
1728+
*err_msg = "clientcert cannot 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 TIES options can not be specified without ORDER BY clause")));
16164+
errmsg("WITH TIES cannot 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 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
@@ -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 prepared transaction",
3014+
errmsg("database \"%s\" is being used by prepared transactions",
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.",

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