| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
| Cc: | Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items) |
| Date: | 2005-08-08 14:36:50 |
| Message-ID: | 28246.1123511810@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2005-08-08 14:36:57 | Re: obtaining row locking information |
| Previous Message | Tom Lane | 2005-08-08 14:26:12 | Re: obtaining row locking information |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2005-08-08 17:38:58 | Re: [HACKERS] Autovacuum loose ends |
| Previous Message | Alvaro Herrera | 2005-08-08 13:30:38 | Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items) |