CREATE OR REPLACE FUNCTION food600.t_dod_list_zmena()
    RETURNS trigger
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE NOT LEAKPROOF
AS $BODY$
BEGIN
 IF (TG_OP = 'UPDATE') THEN
  NEW.zmena := current_timestamp;
  PERFORM food600.f_zmeny_tab('dod_list',NEW.zmena,NEW.c_data);
 ELSIF (TG_OP = 'INSERT') THEN
  NEW.zmena := current_timestamp;
  PERFORM food600.f_zmeny_tab('dod_list',NEW.zmena,NEW.c_data);
 END IF;
RETURN NEW;
END
$BODY$;
