<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial Narrow'; COLOR: #00002b; FONT-SIZE: 12pt">
<DIV>Maybe my mind has just gone numb – but I can’t figure out what is
wrong.</DIV>
<DIV> </DIV>
<DIV>I run this expression </DIV>
<DIV> </DIV>
<DIV>insert into pipe(line, down, id)</DIV>
<DIV> (select st_makeline(st_centroid(num_search.the_geom7),
st_endpoint(bob.edge_data.geom)), </DIV>
<DIV>
st_makeline(st_centroid(num_search.the_geom7), st_endpoint(bob.edge_data.geom)),
1 --pipe_num</DIV>
<DIV> from bob.edge_data, num_search</DIV>
<DIV> where st_intersects(bob.edge_data.geom,
num_search.the_geom7)</DIV>
<DIV> and num_search.seq = 1 );</DIV>
<DIV> </DIV>
<DIV>into this table</DIV>
<DIV>CREATE TABLE public.pipe</DIV>
<DIV>(</DIV>
<DIV> id integer,</DIV>
<DIV> line geometry,</DIV>
<DIV> face_id integer,</DIV>
<DIV> branch_point geometry,</DIV>
<DIV> branch integer,</DIV>
<DIV> up geometry,</DIV>
<DIV> up_done integer,</DIV>
<DIV> down geometry,</DIV>
<DIV> down_done integer,</DIV>
<DIV> right_ geometry,</DIV>
<DIV> right_done integer,</DIV>
<DIV> left_ geometry,</DIV>
<DIV> left_done integer</DIV>
<DIV>)</DIV>
<DIV>WITH (</DIV>
<DIV> OIDS=FALSE</DIV>
<DIV>);</DIV>
<DIV>ALTER TABLE public.pipe</DIV>
<DIV> OWNER TO postgres;</DIV>
<DIV> </DIV>
<DIV>-- Trigger: branch on public.pipe</DIV>
<DIV> </DIV>
<DIV>-- DROP TRIGGER branch ON public.pipe;</DIV>
<DIV> </DIV>
<DIV>CREATE TRIGGER branch</DIV>
<DIV> AFTER INSERT</DIV>
<DIV> ON public.pipe</DIV>
<DIV> FOR EACH ROW</DIV>
<DIV> EXECUTE PROCEDURE public.branch_point();</DIV>
<DIV> </DIV>
<DIV>The line column and the id column are inserted but the down column remains
null.</DIV>
<DIV> </DIV>
<DIV>It’s and after insert trigger so I don’t think the trigger is stopping the
column down insert.</DIV>
<DIV> </DIV>
<DIV>Any help would be appreciated.</DIV>
<DIV> </DIV>
<DIV>Bob</DIV>
<DIV> </DIV></DIV></DIV></BODY></HTML>