DO
$$
BEGIN
IF NOT EXISTS (SELECT trigger_name FROM information_schema.triggers WHERE trigger_schema='food600' and trigger_name='umdruhy_zmena') THEN
	CREATE TRIGGER umdruhy_zmena
	    BEFORE INSERT OR DELETE OR UPDATE 
	    ON food600.umdruhy
	    FOR EACH ROW
	    EXECUTE PROCEDURE food600.umdruhy_zmena();
END IF;
END
$$
    
