Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to avoid infinite loop in Triggers?

Re: How to avoid infinite loop in Triggers?

From: DanHW <danhw_at_aol.com>
Date: 1997/11/22
Message-ID: <19971122052300.AAA00862@ladder01.news.aol.com>#1/1

>Scenerio:
>Doing an operation in a trigger which the trigger
>was called for in the first place results in the
>infinite loop. For example doing UPDATE in a
>(Before/After) ON UPDATE trigger....
>
>Reason for Doing:
>I want to maintain the audit log. That is, when a
>user deletes a record, its not deleted but marked
>as such. Similary when a record is changed, an older
>copy is maintained with deleted marker. And so on?
>
>The Challange:
>How to accomplish it in triggers with getting caught
>in the cyclic infinite loops?
>
>Thanks for your help!
>
>Regards,
>Nasir (nnoor_at_cris.com)

I would suggest copying the original records to a true audit-log table in the triggers, rather than trying to keep everything in the same table.

Dan Received on Sat Nov 22 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US