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 -> Are PL/SQL tables transaction safe?

Are PL/SQL tables transaction safe?

From: Connect Computer <john.mara_at_connects.com>
Date: 21 May 1998 15:51:19 GMT
Message-ID: <01bd84d0$4977e4a0$de45ddcc@jmara.connects.com>


I am writing triggers to update history tables and have encountered the dreaded 'mutating table' error. To get around that, I have created a package with variables, a row trigger to save the key and a statement trigger to affect the changes.

My question is about the PL/SQL package variables. I am using a counter to index the variables. At the first execution of the row trigger, I set it to 1. If multiple rows are affected, I increment the counter. In the statement trigger, I loop through, do my work and reset the index to 0.

Is this safe within a transaction? Can these package variables be accessed concurrently by more than one trigger? The only code against these variables is in the trigger.

I have scoured the Oracle doco and haven't come up with any definitive explanation. Can anyone help me answer this?

Thanks. Received on Thu May 21 1998 - 10:51:19 CDT

Original text of this message

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