Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

trigger function not working!

Hey all,

My function which is called by a trigger only partially works!!!

There are three triggers which are attached to three tables - one main table and two junction tables. When any records are inserted, deleted, or updated in any of these three tables it calls a function which records the changes in an audit table.

The problem is, when deleting from the main table -the trigger does not fire!!! For all other operations and deleting from the junction table it works!

Also the second problem is if i need to delete records from the main parent table and all its related records in the child table -the trigger will not fire when these records are deleted...although if a records is deleted by itself in the child table it works perfectly!!!

Any ideas why this may happen and what could be done to resolve this?

I am using postgresql 8.1.

Thanks in advance for any help.

ev
[950 byte] By [evian] at [2007-11-11 8:49:33]