-- in the before trigger function, everything on the claim has been checked and adapted.
-- now (in the after trigger, when all claims were inserted/updated in the database), let's check if the task should also be updated (to conflict status for example)
...
...
@@ -1064,6 +1067,10 @@ BEGIN
ENDIF;
ENDIF;
SELECT*fromclock_timestamp()intopart_end;
RAISENOTICE'after_claim_insertupdatedelete1 took %',part_end-part_start;
SELECT*fromclock_timestamp()intopart_start;
-- if this claim was moved or went from claimed to other status
-- then check all other claims in conflict which might be affected by this change
-- maybe they can be updated from conflict status to tentative...
...
...
@@ -1086,6 +1093,10 @@ BEGIN
ENDLOOP;
ENDIF;
SELECT*fromclock_timestamp()intopart_end;
RAISENOTICE'after_claim_insertupdatedelete2 took %',part_end-part_start;
SELECT*fromclock_timestamp()intopart_start;
-- if this claim went from to claimed status
-- then check all other claims in tentative state which might be affected by this change
-- maybe they should be updated from tentative status to conflict...
...
...
@@ -1107,6 +1118,10 @@ BEGIN
ENDLOOP;
ENDIF;
SELECT*fromclock_timestamp()intopart_end;
RAISENOTICE'after_claim_insertupdatedelete3 took %',part_end-part_start;
SELECT*fromclock_timestamp()intopart_start;
SELECT*fromclock_timestamp()intoproc_end;
RAISENOTICE'after_claim_insertupdatedelete took %',proc_end-proc_start;