I have function, which should be called after update and delete on one table.
At the end of function I have to return "old" if function was called after delete or "new" if procedure was called after update.
I did it like this:
if new is null then return old; end if; return new;
But I get error telling me that "new" has not been initialized if function is called after delete. My question is how to recognize if function was called after delete or update?