Description:
I have noticed that when you have a trigger that has an error in it, The error message that comes back does not alert you to the trigger that caused that error.
For Instance I have a main table that has a number of columns with that I have an audit trigger. This Trigger will add a record to an audit table when a record is inserted or updated to the main table.
Say for instance I had a trigger that I forgot to update that was addressing columns that were not in the audit table anymore. I would get an error something like this.
Unknown column 'SOMECOLUMN' in 'field list'
It would be nice if this error could identify the Trigger that caused it. When I am working with other complexities like J2EE with Hibernate and seeing an error like this caused me a bit of a run around while trying to find it. This time could have been saved with a message more like.
Error Executing Trigger MYTRIGGER “Unknown column 'SOMECOLUMN' in 'field list’”
How to repeat:
Create two tables,
Create a trigger to update the second table addressing a field that the second table does not have.
When you execute the trigger you will just see the basic error message.
Suggested fix:
Have a more informative error message for Triggers such as
Error Executing Trigger MYTRIGGER “Unknown column 'SOMECOLUMN' in 'field list’”