Locking in a Pre-Delete trigger

From: <reye_at_qut.edu.au>
Date: 14 Jul 92 18:23:19 EST
Message-ID: <1992Jul14.182319.51214_at_qut.edu.au>


When you set the Delete Details checkbox in a master-detail relationship, SQL*Forms (v3.00.16.07.00) generates a Pre-Delete trigger containing the code:

    lock table <DetailTable> in share update mode;     delete from <DetailTable> where <ForeignKey> = :<Master.PrimaryKey>;

From my reading of chapter 12 of the Oracle DBA's Guide, a DELETE statement automatically obtains an RX table lock, which seems to be a "more exclusive" lock than the share update (RS) lock. So, why take a lock which immediately needs to be converted? Is this a bug or a feature?

Jim Reye
School of Information Systems
Queensland University of Technology
Australia Received on Wed Jul 15 1992 - 01:23:19 CEST

Original text of this message