Subject | An Interesting Update Trigger Behavior |
---|---|
Author | Kurt Federspiel |
Post date | 2009-08-05T06:47:46Z |
I have two tables that have similar fields, one is the latest snapshot of data, while the other is a history. Since the one table is a subset and snapshot of the other (and contains hundreds of rows and opposed to the millions), when I insert into the History table, I have a trigger that does a pre-insert update on the Snapshot.
The Snapshot has
ID varchar[32] not null
A1 float
A2 float
DateTime_Stamp TIMESTAMP
What I discovered today was that the Update Trigger does not update if A1, A2 and DateTime_Stamp are all NULL. Can someone explain this; is it potentially a bug or is the lack of data (i.e. the NULL) something that cannot be updated?
Thanks.
Kurt.
----------------------------------------
Never underestimate the Power of Denial.
The Snapshot has
ID varchar[32] not null
A1 float
A2 float
DateTime_Stamp TIMESTAMP
What I discovered today was that the Update Trigger does not update if A1, A2 and DateTime_Stamp are all NULL. Can someone explain this; is it potentially a bug or is the lack of data (i.e. the NULL) something that cannot be updated?
Thanks.
Kurt.
----------------------------------------
Never underestimate the Power of Denial.