> Ok, the function works only with a trigger that is defined as ON INSERT
> OR UPDATE. If I try to define a trigger for ON DELETE and then delete a
> row from the table, there is nothing in the 'NEW' variable to return. I
> get an error message. If I define the function to return NULL, 0, or
> nothing, then it comes up with a type mis-match error. Is there anyone
> who can help? Thanks.
Try using the OLD variable instead.