From: Álvaro Herrera Date: Fri, 12 Jun 2026 12:24:41 +0000 (+0200) Subject: Fix translatable string construction in psql X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5459223edb1d08d31711c55f7be9aa6a5710f762;p=thirdparty%2Fpostgresql.git Fix translatable string construction in psql Similar to commit 3692a622d3fd, for a slightly different code pattern in psql. No backpatch to avoid disrupting translation in stable branches. Author: Álvaro Herrera Reviewed-by: Peter Smith Discussion: https://postgr.es/m/airjxKXx7aTG8kfE@alvherre.pgsql --- diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 7f9b2b71a36..af3935b0078 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2504,18 +2504,18 @@ 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, _(", ")); + printfPQExpBuffer(&tmpbuf, _("unique nulls not distinct, ")); + else + printfPQExpBuffer(&tmpbuf, _("unique, ")); } else resetPQExpBuffer(&tmpbuf); - appendPQExpBuffer(&tmpbuf, "%s, ", indamname); /* we assume here that index and table are in same schema */ - appendPQExpBuffer(&tmpbuf, _("for table \"%s.%s\""), - schemaname, indtable); + /*- translator: the first %s is an index AM name (eg. btree) */ + appendPQExpBuffer(&tmpbuf, _("%s, for table \"%s.%s\""), + indamname, schemaname, indtable); if (strlen(indpred)) appendPQExpBuffer(&tmpbuf, _(", predicate (%s)"), indpred);