I don't suppose that the todo item:
Referential Integrity o Add deferred trigger queue file (Jan)
Means that there will be a statement like:
CREATE TRIGGER ... FOR EACH TRANSACTION
?
I frequently encounter situations where the database is only 'good' when all the the statements in the transaction have completed. (Duh, isn't this the _point_ of transactions?) The latest is I want a per foreign key sequence number column, 1, 2, 3, etc., say, a per-person counter, which must not contain any 'gaps'. I can do this so long as nobody every makes any mistakes in sequencing, but once the sequence numbers are in place there's no way to re-order the rows in a sequence (the rows belonging to one person) without deleting and re-creating all the rows with sequence numbers
= the first mis-placed sequence number. Given the
existance of other rows which reference the sequenced rows, this is not a pretty picture. It'd be nice to be able to put a series of UPDATE statements in a transaction and have a trigger check the state of the database when the transaction commits. (And be able to raise an exception if the rules are violated.)
Has anybody else encountered problems like this and come up with any solutions?
Stupid question: If triggers automatically created to support REFERENCES constraints can be deferred to execute on transaction commit, and see the results of the statements executed prior to the COMMIT, then why can't this be done for regular triggers?
Regards,
Karl <[EMAIL PROTECTED]> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly