From: Roy Hann <specially_at_processed.almost.meat>
Date: Thu, 31 Jul 2008 11:18:19 -0500
Message-ID: <_f-dnW4TR-JWeAzVnZ2dneKdnZydnZ2d_at_pipex.net>

This is not a theory question by any means, but perhaps there is someone hanging out here who is able to speak with authority on SQL. We are trying to figure out the justification for why a BEFORE trigger should be prevented from doing any updates. The wording we're looking at from the standard is:

"If the trigger is a BEFORE trigger and if, before the completion of the execution of any <SQL procedure statement> simply contained in triggered SQL statements, an attempt is made to execute an SQL-data change statement or an SQL-invoked routine that possibly modifies SQL-data, then an exception condition is raised: prohibited statement encountered during trigger execution."

Obviously one shouldn't expect to be able to update a row that doesn't exist yet, but why prevent all updates (to other rows, other tables)?

Received on Thu Jul 31 2008 - 18:18:19 CEST

Original text of this message