diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index eec09ba1ded..e5ef0fdae7d 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -20588,8 +20588,8 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd, exceptpuboids = GetRelationExcludedPublications(RelationGetRelid(attachrel)); if (exceptpuboids != NIL) { - bool first = true; StringInfoData pubnames; + char *sep = ""; initStringInfo(&pubnames); @@ -20597,18 +20597,9 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd, { char *pubname = get_publication_name(pubid, false); - if (!first) - { - /* - * translator: This is a separator in a list of publication - * names. - */ - appendStringInfoString(&pubnames, _(", ")); - } - - first = false; - - appendStringInfo(&pubnames, _("\"%s\""), pubname); + appendStringInfoString(&pubnames, sep); + appendStringInfo(&pubnames, "\"%s\"", pubname); + sep = ", "; } ereport(ERROR, diff --git a/src/backend/replication/logical/conflict.c b/src/backend/replication/logical/conflict.c index 2887dfb7150..8adbb60af6d 100644 --- a/src/backend/replication/logical/conflict.c +++ b/src/backend/replication/logical/conflict.c @@ -195,7 +195,7 @@ static void append_tuple_value_detail(StringInfo buf, List *tuple_values, bool need_newline) { - bool first = true; + char *prefix = ": "; Assert(buf != NULL && tuple_values != NIL); @@ -209,31 +209,12 @@ append_tuple_value_detail(StringInfo buf, List *tuple_values, if (!tuple_value) continue; - if (first) - { - /* - * translator: The colon is used as a separator in conflict - * messages. The first part, built in the caller, describes what - * happened locally; the second part lists the conflicting keys - * and tuple data. - */ - appendStringInfoString(buf, _(": ")); - } - else - { - /* - * translator: This is a separator in a list of conflicting keys - * and tuple data. - */ - appendStringInfoString(buf, _(", ")); - } - + appendStringInfoString(buf, prefix); appendStringInfoString(buf, tuple_value); - first = false; + prefix = ", "; } - /* translator: This is the terminator of a conflict message */ - appendStringInfoString(buf, _(".")); + appendStringInfoChar(buf, '.'); if (need_newline) appendStringInfoChar(buf, '\n'); diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c index 0b1d80b5b0f..edf2b671ebc 100644 --- a/src/backend/replication/logical/relation.c +++ b/src/backend/replication/logical/relation.c @@ -239,7 +239,7 @@ static char * logicalrep_get_attrs_str(LogicalRepRelation *remoterel, Bitmapset *atts) { StringInfoData attsbuf; - int attcnt = 0; + char *sep = ""; int i = -1; Assert(!bms_is_empty(atts)); @@ -248,12 +248,9 @@ logicalrep_get_attrs_str(LogicalRepRelation *remoterel, Bitmapset *atts) while ((i = bms_next_member(atts, i)) >= 0) { - attcnt++; - if (attcnt > 1) - /* translator: This is a separator in a list of entity names. */ - appendStringInfoString(&attsbuf, _(", ")); - - appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]); + appendStringInfoString(&attsbuf, sep); + appendStringInfo(&attsbuf, ("\"%s\""), remoterel->attnames[i]); + sep = ", "; } return attsbuf.data; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c4c3fbc4fe3..d6c26149991 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3168,18 +3168,8 @@ parse_and_validate_value(const struct config_generic *record, hintmsg = config_enum_get_options(conf, _("Available values: "), - - /* - * translator: This is the terminator of a list of entity - * names. - */ - _("."), - - /* - * translator: This is a separator in a list of entity - * names. - */ - _(", ")); + ".", + ", "); ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index dd1179ef927..850dffbf158 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2504,10 +2504,10 @@ describeOneTableDetails(const char *schemaname, printfPQExpBuffer(&tmpbuf, _("primary key, ")); else if (strcmp(indisunique, "t") == 0) { - printfPQExpBuffer(&tmpbuf, _("unique")); if (strcmp(indnullsnotdistinct, "t") == 0) - appendPQExpBufferStr(&tmpbuf, _(" nulls not distinct")); - appendPQExpBufferStr(&tmpbuf, _(", ")); + appendPQExpBufferStr(&tmpbuf, _("unique nulls not distinct, ")); + else + printfPQExpBuffer(&tmpbuf, _("unique, ")); } else resetPQExpBuffer(&tmpbuf);