Re: SQL BEFORE puzzle
Date: Mon, 4 Aug 2008 11:20:04 -0700 (PDT)
Message-ID: <7c285b9d-1781-4f33-8235-2f4781ccc99e_at_w7g2000hsa.googlegroups.com>
On Aug 1, 7:47 am, "Walter Mitty" <wami..._at_verizon.net> wrote:
>
> I'm not speaking with authority here, but I'll offer a guess:
>
> What if a given event triggers more than one BEFORE trigger? Now, there's a
> problem if one of the triggers is allowed to do updates,
> and the other trigger is executed in the context of the same transaction,
> but later, the second trigger doesn't actually see the BEFORE state of the
> database.
But you have the same issue with AFTER triggers. If an update fires
multiple
AFTER triggers, and some alter (other table) data and others read the
same,
the result is indeterminate if there's no way to somehow order the
trigger
firing. The answer with after triggers is to simply state that such
things
produce indeterminate results. I haven't been able to come up with an
equivalent scenario for BEFORE triggers that can't be dealt with
in the same way.
Received on Mon Aug 04 2008 - 20:20:04 CEST
