From 55cd9a8ff6a7cc244a33776c447cb0f0f10b6b94 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Sun, 4 Jun 2017 11:41:16 -0400 Subject: Assorted translatable string fixes Mark our rusage reportage string translatable; remove quotes from type names; unify formatting of very similar messages. --- src/backend/commands/vacuumlazy.c | 10 ++++------ src/backend/commands/variable.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src/backend/commands') diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index e1e39dfb4ee..0506a9340c3 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -1342,8 +1342,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, "%u pages are entirely empty.\n", empty_pages), empty_pages); - appendStringInfo(&buf, _("%s."), - pg_rusage_show(&ru0)); + appendStringInfo(&buf, "%s.", pg_rusage_show(&ru0)); ereport(elevel, (errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u out of %u pages", @@ -1418,8 +1417,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats) (errmsg("\"%s\": removed %d row versions in %d pages", RelationGetRelationName(onerel), tupindex, npages), - errdetail("%s.", - pg_rusage_show(&ru0)))); + errdetail_internal("%s", pg_rusage_show(&ru0)))); } /* @@ -1607,7 +1605,7 @@ lazy_vacuum_index(Relation indrel, (errmsg("scanned index \"%s\" to remove %d row versions", RelationGetRelationName(indrel), vacrelstats->num_dead_tuples), - errdetail("%s.", pg_rusage_show(&ru0)))); + errdetail_internal("%s", pg_rusage_show(&ru0)))); } /* @@ -1817,7 +1815,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats) (errmsg("\"%s\": truncated %u to %u pages", RelationGetRelationName(onerel), old_rel_pages, new_rel_pages), - errdetail("%s.", + errdetail_internal("%s", pg_rusage_show(&ru0)))); old_rel_pages = new_rel_pages; } while (new_rel_pages > vacrelstats->nonempty_pages && diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index defafa54b29..1f72d7bee95 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -776,7 +776,7 @@ assign_client_encoding(const char *newval, void *extra) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot change client_encoding in a parallel worker"))); + errmsg("cannot change client_encoding during a parallel operation"))); } /* We do not expect an error if PrepareClientEncoding succeeded */ -- cgit v1.2.3