This maybe more of a theoretical question, can you actually make a Trigger run
after completion of the entire transaction?
Here's what I have:
LOG
user | startdate | enddate
enddate is getting updated by a trigger (on insert or update).
I have the following transaction:
BEGIN;
Insert into LOG(user,startdate) values('jdoe','2006-08-13');
Insert into LOG(user,startdate) values('jdoe','2006-08-14');
Insert into LOG(user,startdate) values('jdoe','2006-08-15');
Insert into LOG(user,startdate) values('jdoe','2006-08-16');
Insert into LOG(user,startdate) values('jdoe','2006-08-17');
........... another 20-30 more inserts..........
COMMIT;
The trigger actually runs on each Insert and therefore slows down the
Insert quite a bit.
My question is, can you tell the trigger to run after Commit?