Delete Cascade & Delete Triggers
Posted in 1997
Chad Chervitz — — source: Informix-list mailing list archive (1991-1998)
I have 2 tables, parent and child (P & C). C has an on delete cascade reference constraint, referencing P. This is so that if P row is deleted, C rows are also. But I also need something to happen when C rows are deleted (which can happen independantly of P row being deleted), so I tried to create a DELETE trigger on C. But Informix tells me I can't create a DELETE trigger on a table participating in an ON DELETE CASCADE. Is this true? How do I go about trapping deletes on C? BTW, one restriction -- I can't modify the client side of the application (i.e., so I can't just follow the C delete statement with another step inside the client app). Thanks, Chad