Fix translatable string construction in psql

Similar to commit 3692a622d3, for a slightly different code pattern in
psql.

No backpatch to avoid disrupting translation in stable branches.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Discussion: https://postgr.es/m/airjxKXx7aTG8kfE@alvherre.pgsql
This commit is contained in:
Álvaro Herrera 2026-06-12 14:24:41 +02:00
parent 0b74df66f0
commit 5459223edb
No known key found for this signature in database
GPG key ID: 1C20ACB9D5C564AE

View file

@ -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);