Re: Remove an unnecessary errmsg_plural in dependency.c
От | Peter Eisentraut |
---|---|
Тема | Re: Remove an unnecessary errmsg_plural in dependency.c |
Дата | |
Msg-id | 74ce9862-c723-45fd-d3bb-f4901515320e@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Remove an unnecessary errmsg_plural in dependency.c (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: Remove an unnecessary errmsg_plural in dependency.c
|
Список | pgsql-hackers |
On 24.03.22 13:48, Bharath Rupireddy wrote: > Yes, the singular version of the message isn't required at all as > numReportedClient > 1. Hence I proposed to remove errmsg_plural and > singular version. The issue is that n == 1 and n != 1 are not the only cases that errmsg_plural() handles. Some languages have different forms for n == 1, n == 2, and n >= 5, for example. So while it is true that in errmsg_plural("drop cascades to %d other object", "drop cascades to %d other objects", the English singular string will never be used, you have to keep the errmsg_plural() call so that it can handle variants like the above for other languages. You could write errmsg_plural("DUMMY NOT USED %d", "drop cascades to %d other objects", but I don't think that is better.
В списке pgsql-hackers по дате отправления: