begin;

CREATE TRIGGER cal_area_utm_ed_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_ed_servidumbres BEFORE INSERT OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_ed_elem_interiores BEFORE INSERT OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_fincas BEFORE INSERT OR UPDATE ON src25830.fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_servidumbres BEFORE INSERT OR UPDATE ON src25830.servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_elem_interiores BEFORE INSERT OR UPDATE ON src25830.elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_perimetro_utm_ed_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_ed_servidumbres BEFORE INSERT OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_ed_elem_interiores BEFORE INSERT OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_fincas BEFORE INSERT OR UPDATE ON src25830.fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_servidumbres BEFORE INSERT OR UPDATE ON src25830.servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_elem_interiores BEFORE INSERT OR UPDATE ON src25830.elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_area_elip_ed_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_area_elip_ed_servidumbres BEFORE INSERT OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_area_elip_ed_elem_interiores BEFORE INSERT OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_area_elip_fincas BEFORE INSERT OR UPDATE ON src25830.fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_area_elip_servidumbres BEFORE INSERT OR UPDATE ON src25830.servidumbres FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_area_elip_elem_interiores BEFORE INSERT OR UPDATE ON src25830.elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.cal_area_elip();
CREATE TRIGGER cal_lon_utm_ed_lindes BEFORE INSERT OR UPDATE ON ed_src25830.ed_lindes FOR EACH ROW EXECUTE PROCEDURE script.cal_lon_utm();
CREATE TRIGGER cal_lon_utm_lindes BEFORE INSERT OR UPDATE ON src25830.lindes FOR EACH ROW EXECUTE PROCEDURE script.cal_lon_utm();
CREATE TRIGGER cal_perimetro_utm_ed_overlaps_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_overlaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_perimetro_utm_overlaps_fincas BEFORE INSERT OR UPDATE ON src25830.overlaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_perimetro_utm();
CREATE TRIGGER cal_area_utm_ed_overlaps_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_overlaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_area_utm_overlaps_fincas BEFORE INSERT OR UPDATE ON src25830.overlaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_area_utm();
CREATE TRIGGER cal_lon_utm_ed_gaps_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_gaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_lon_utm();
CREATE TRIGGER cal_lon_utm_gaps_fincas BEFORE INSERT OR UPDATE ON src25830.gaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.cal_lon_utm();
CREATE TRIGGER geom_fincas_ed_ed_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.geom_fincas_ed();
CREATE TRIGGER geom_fincas_def_fincas BEFORE INSERT OR UPDATE ON src25830.fincas FOR EACH ROW EXECUTE PROCEDURE script.geom_fincas_def();
CREATE TRIGGER geom_linde_lindes BEFORE INSERT OR UPDATE ON src25830.lindes FOR EACH ROW EXECUTE PROCEDURE script.geom_linde();
CREATE TRIGGER geom_linde_ed_lindes BEFORE INSERT OR UPDATE ON ed_src25830.ed_lindes FOR EACH ROW EXECUTE PROCEDURE script.geom_linde();
CREATE TRIGGER geom_imagenes_img_linde BEFORE INSERT OR UPDATE ON src25830.img_linde FOR EACH ROW EXECUTE PROCEDURE script.geom_imagenes();
CREATE TRIGGER geom_imagenes_ed_img_linde BEFORE INSERT OR UPDATE ON ed_src25830.ed_img_linde FOR EACH ROW EXECUTE PROCEDURE script.geom_imagenes();
CREATE TRIGGER geom_servid_ei_servidumbres BEFORE INSERT OR UPDATE ON src25830.servidumbres FOR EACH ROW EXECUTE PROCEDURE script.geom_servid_ei();
CREATE TRIGGER geom_servid_ei_ed_servidumbres BEFORE INSERT OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.geom_servid_ei();
CREATE TRIGGER geom_servid_ei_elem_interiores BEFORE INSERT OR UPDATE ON src25830.elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.geom_servid_ei();
CREATE TRIGGER geom_servid_ei_ed_elem_interiores BEFORE INSERT OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.geom_servid_ei();
CREATE TRIGGER error_area_ed_fincas BEFORE INSERT OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER error_area_ed_servidumbres BEFORE INSERT OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER error_area_ed_elem_interiores BEFORE INSERT OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER error_area_fincas BEFORE INSERT OR UPDATE ON src25830.fincas FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER error_area_servidumbres BEFORE INSERT OR UPDATE ON src25830.servidumbres FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER error_area_elem_interiores BEFORE INSERT OR UPDATE ON src25830.elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.error_area();
CREATE TRIGGER acceso_trabajo_ed_linde_replanteado BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_linde_replanteado FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_linde_proyectado BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_linde_proyectado FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_ref_cat_urb BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_ref_cat_urb FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_colindantes BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_colindantes FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_div_vert BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_div_vert FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_actas_deslinde BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_actas_deslinde FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_linde_existente BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_linde_existente FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_linde_digitalizado BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_linde_digitalizado FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_img_elem_int BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_img_elem_int FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_ref_cat_rus BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_ref_cat_rus FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_lindes BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_lindes FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_img_linde BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_img_linde FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_fincas BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_fincas FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_servidumbres BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_servidumbres FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_elem_interiores BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_elem_interiores FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_overlaps_fincas BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_overlaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();
CREATE TRIGGER acceso_trabajo_ed_gaps_fincas BEFORE INSERT OR DELETE OR UPDATE ON ed_src25830.ed_gaps_fincas FOR EACH ROW EXECUTE PROCEDURE script.acceso_trabajo();

commit;