Re: pgsql: Fix lack of message pluralization - Mailing list pgsql-committers

From Daniel Gustafsson
Subject Re: pgsql: Fix lack of message pluralization
Date
Msg-id BDA7E255-6E17-4F6E-AD88-0363BF2623F3@yesql.se
Whole thread
In response to pgsql: Fix lack of message pluralization  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-committers
> On 3 Sep 2026, at 12:47, Peter Eisentraut <peter@eisentraut.org> wrote:
>
> Fix lack of message pluralization

Maybe I'm daft, but why is the message below pluralized since the %d parameter
is the same?

--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -904,8 +904,10 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
                if (nargs > PG_INT16_MAX)
                        ereport(ERROR,
                                        errcode(ERRCODE_TOO_MANY_ARGUMENTS),
-                                       errmsg("triggers cannot have more than %d arguments",
-                                                  PG_INT16_MAX));
+                                       errmsg_plural("triggers cannot have more than %d argument",
+                                                                 "triggers cannot have more than %d arguments",
+                                                                 PG_INT16_MAX,
+                                                                 PG_INT16_MAX));

--
Daniel Gustafsson




pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix lack of message pluralization
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Move visibility map memory ordering comments.