Subject | Re: [ib-support] Auditing updates |
---|---|
Author | David K. Trudgett |
Post date | 2002-02-11T21:46:03Z |
On Monday 2002-02-11 at 11:31:37 +0100, Svein Erling Tysvær wrote:
every case where OLD is NULL and NEW is NULL (i.e., no change at all).
By the way, I've now put this into an After Update trigger. A Before
Update trigger isn't quite the right place to do logging...
Thanks anyway.
David Trudgett
> Not much of an improvement, but I thinkI believe that code as you have it would end up logging as a change
>
> IF ((OLD.mast_Column_Name IS NULL AND
> NEW.mast_Column_Name IS NOT NULL) OR
> (OLD.mast_Column_Name IS NOT NULL AND
> NEW.mast_Column_Name IS NULL)) THEN
> EXECUTE PROCEDURE Audit_The_Change(parameters, ...);
> ELSE IF (OLD.mast_Column_Name <> NEW.mast_Column_Name) THEN
> EXECUTE PROCEDURE Audit_The_Change(parameters, ...);
>
> would suffice (i.e. I don't see your first IF-statement making any
> difference).
every case where OLD is NULL and NEW is NULL (i.e., no change at all).
By the way, I've now put this into an After Update trigger. A Before
Update trigger isn't quite the right place to do logging...
Thanks anyway.
David Trudgett