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

