mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Fix lack of message pluralization
Fixups for commitsb99b74144f,79b101486c,bf7d19be9b.
This commit is contained in:
@@ -892,8 +892,10 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
|
||||
if (nargs > PG_INT16_MAX)
|
||||
ereport(ERROR,
|
||||
errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
||||
errmsg("triggers cannot have more than %d arguments",
|
||||
PG_INT16_MAX));
|
||||
errmsg_plural("triggers cannot have more than %d argument",
|
||||
"triggers cannot have more than %d arguments",
|
||||
PG_INT16_MAX,
|
||||
PG_INT16_MAX));
|
||||
|
||||
foreach(le, stmt->args)
|
||||
{
|
||||
|
||||
@@ -1048,8 +1048,10 @@ slot_store_data(TupleTableSlot *slot, LogicalRepRelMapEntry *rel,
|
||||
if (remoteattnum >= tupleData->ncols)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||
errmsg("logical replication column %d not found in tuple: only %d column(s) received",
|
||||
remoteattnum + 1, tupleData->ncols)));
|
||||
errmsg_plural("logical replication column %d not found in tuple: only %d column received",
|
||||
"logical replication column %d not found in tuple: only %d columns received",
|
||||
tupleData->ncols,
|
||||
remoteattnum + 1, tupleData->ncols)));
|
||||
|
||||
colvalue = &tupleData->colvalues[remoteattnum];
|
||||
|
||||
@@ -1165,8 +1167,10 @@ slot_modify_data(TupleTableSlot *slot, TupleTableSlot *srcslot,
|
||||
if (remoteattnum >= tupleData->ncols)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||
errmsg("logical replication column %d not found in tuple: only %d column(s) received",
|
||||
remoteattnum + 1, tupleData->ncols)));
|
||||
errmsg_plural("logical replication column %d not found in tuple: only %d column received",
|
||||
"logical replication column %d not found in tuple: only %d columns received",
|
||||
tupleData->ncols,
|
||||
remoteattnum + 1, tupleData->ncols)));
|
||||
|
||||
if (tupleData->colstatus[remoteattnum] != LOGICALREP_COLUMN_UNCHANGED)
|
||||
{
|
||||
@@ -2888,8 +2892,10 @@ apply_handle_update(StringInfo s)
|
||||
if (remoteattnum >= newtup.ncols)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||
errmsg("logical replication column %d not found in tuple: only %d column(s) received",
|
||||
remoteattnum + 1, newtup.ncols)));
|
||||
errmsg_plural("logical replication column %d not found in tuple: only %d column received",
|
||||
"logical replication column %d not found in tuple: only %d columns received",
|
||||
newtup.ncols,
|
||||
remoteattnum + 1, newtup.ncols)));
|
||||
|
||||
if (newtup.colstatus[remoteattnum] != LOGICALREP_COLUMN_UNCHANGED)
|
||||
target_perminfo->updatedCols =
|
||||
|
||||
@@ -1175,10 +1175,19 @@ ExportSnapshot(Snapshot snapshot)
|
||||
snapshot->subxcnt + nchildren > GetMaxSnapshotSubxidCount())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
|
||||
errmsg("cannot export snapshot with %d running transaction IDs",
|
||||
snapshot->subxcnt + nchildren),
|
||||
errdetail("A snapshot taken during recovery is exported with every transaction ID that it treats as running, and at most %d can be stored.",
|
||||
GetMaxSnapshotSubxidCount())));
|
||||
errmsg_plural("cannot export snapshot with %d running transaction ID",
|
||||
"cannot export snapshot with %d running transaction IDs",
|
||||
snapshot->subxcnt + nchildren,
|
||||
snapshot->subxcnt + nchildren),
|
||||
|
||||
/*
|
||||
* The singular and plural strings below are identical in English but
|
||||
* could differ in translations.
|
||||
*/
|
||||
errdetail_plural("A snapshot taken during recovery is exported with every transaction ID that it treats as running, and at most %d can be stored.",
|
||||
"A snapshot taken during recovery is exported with every transaction ID that it treats as running, and at most %d can be stored.",
|
||||
GetMaxSnapshotSubxidCount(),
|
||||
GetMaxSnapshotSubxidCount())));
|
||||
|
||||
/*
|
||||
* Generate file path for the snapshot. We start numbering of snapshots
|
||||
|
||||
Reference in New Issue
Block a user