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

From Alvaro Herrera
Subject Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Date
Msg-id 20050808133038.GA26568@alvh.no-ip.org
Whole thread Raw
In response to Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)  (Satoshi Nagayasu <nagayasus@nttdata.co.jp>)
Responses Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
List pgsql-patches
On Mon, Aug 08, 2005 at 02:13:28PM +0900, Satoshi Nagayasu wrote:
> Alvaro Herrera wrote:

> >>+     elog(NOTICE, "%d trigger(s) on %s %s.",
> >>+          changed,
> >>+          NameStr(rel->rd_rel->relname),
> >>+          enable ? "enabled" : "disabled");
> >
> >
> > should really be two messages (Maybe even four: disabled-plural,
> > disabled-singular, enabled-plural, enabled-singular)
>
> 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")
}

etc.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"I personally became interested in Linux while I was dating an English major
who wouldn't know an operating system if it walked up and bit him."
(Val Henson)

pgsql-patches by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: gettime() - a timeofday() alternative
Next
From: Tom Lane
Date:
Subject: Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)