Subject | Are before triggers absolutely reliable? What happens if they fail? |
---|---|
Author | mlq97 |
Post date | 2007-10-29T10:57:04Z |
I have a before insert trigger which includes NEW.DOC_CREATED_DATE =
CURRENT_TIMESTAMP;
99% of the time this works, but 1% of the time there is a null value.
I assume that there can be only 2 causes. Either 1. the trigger is
failing or 2. the column is being overwritten somehow after the insert.
In order to discount #1, would it be true to say that if a trigger
and/or generator fails for some reason that there would be an error
message and the insert would not occur?
Can transaction control be used to enforce this at the trigger level
or do transactions only exist in the context of an external application?
Thanks
Mitch
CURRENT_TIMESTAMP;
99% of the time this works, but 1% of the time there is a null value.
I assume that there can be only 2 causes. Either 1. the trigger is
failing or 2. the column is being overwritten somehow after the insert.
In order to discount #1, would it be true to say that if a trigger
and/or generator fails for some reason that there would be an error
message and the insert would not occur?
Can transaction control be used to enforce this at the trigger level
or do transactions only exist in the context of an external application?
Thanks
Mitch