DO
$$
BEGIN
IF NOT EXISTS (SELECT trigger_name FROM information_schema.triggers WHERE trigger_schema='food600' and trigger_name='pr_hores10_c_uzav') THEN
	CREATE TRIGGER pr_hores10_c_uzav
	    AFTER INSERT
	    ON food600.pr_hores10
	    FOR EACH ROW
	    EXECUTE PROCEDURE food600.pridajcuzavzprhores10();
END IF;
END
$$
