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