<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt"><div style="" class=""><span style="" class="">Hello all</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">I try to insert the result of an interssection in another table using rules like this.<br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">CREATE RULE interseccion_con_anp AS ON INSERT TO z0_poligono_corte <br style="" class="">   DO also insert into z0_a_n_p_13 (id_poligono, folio, obs, anp,
 geometria) select pol.id, pol.folio, pol.obs, capa.anp, ST_Multi(ST_Intersection(capa.geom, pol.geometria))<br style="" class="">from a_n_p_13 capa, z0_poligono_corte pol<br style="" class="">where pol.id=NEW.id<br style="" class="">and capa.geom && pol.geometria<br style="" class="">and ST_IsEmpty(ST_Intersection(capa.geom, pol.geometria)) != TRUE;</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">When I save a poligon on </span><span style="" class="">z0_poligono_corte, use that polygon to intersect with
 polygons on layer </span><span style="" class="">a_n_p_13 capa and save the result on  </span><span style="" class="">z0_a_n_p_13 but don't work and there are not errors on postgresql.log.</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 10.6667px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">Thanks<br></span></div><div style="" class=""> </div><div style="" class="">--<br style="" class="">Nahum Castro<br style="" class="">Leon, Guanajuato, Mexico<br style="" class="">http://www.leon-linux.com<br style="" class="">e-mail: pedro1_72 [en] yahoo [punto] com</div></div></body></html>