Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items) - Mailing list pgsql-patches

From Tom Lane
Subject Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Date
Msg-id 28246.1123511810@sss.pgh.pa.us
Whole thread Raw
In response to Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
List pgsql-patches
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> What does "really be two messages" mean?

> I mean you should do this:

> if (enabled)
> {
>     if (changed == 1)
>         ereport("One trigger on %s enabled")
>     else
>         ereport("%d triggers on %d enabled")
> }

This isn't really a gain in localizability because it assumes that there
are only singular and plural forms.  I do agree that plugging words like
"enabled" or "disabled" into a string is not good style.  Please read
the message style guidelines at
http://developer.postgresql.org/docs/postgres/error-style-guide.html
particularly the section about writing localization-friendly messages
http://developer.postgresql.org/docs/postgres/nls-programmer.html#NLS-GUIDELINES

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Autovacuum loose ends