I want to do a trigger in Postgres that it will update a log. My trigger will fire when an update, insert or delete is done.
CREATE TRIGGER tr_usuario
BEFORE INSERT OR DELETE OR UPDATE
ON public.usuario
FOR EACH ROW
EXECUTE PROCEDURE public.actualizarlog();
Since my trigger is fired by any of these three actions, I can't know specifically what action triggered the trigger, but in my log also i want to save tha action that was performed. Is there any defined function in Postgres that let me know what action triggers a trigger?