[postgis-users] Insert into

Bob Pawley rjpawley at shaw.ca
Tue Dec 18 10:39:45 PST 2012


Maybe my mind has just gone numb – but I can’t figure out what is wrong.

I run this expression 

insert into pipe(line, down, id)
    (select st_makeline(st_centroid(num_search.the_geom7), st_endpoint(bob.edge_data.geom)),  
        st_makeline(st_centroid(num_search.the_geom7), st_endpoint(bob.edge_data.geom)), 1 --pipe_num
    from bob.edge_data, num_search
    where st_intersects(bob.edge_data.geom, num_search.the_geom7)
    and num_search.seq = 1 );

into this table
CREATE TABLE public.pipe
(
  id integer,
  line geometry,
  face_id integer,
  branch_point geometry,
  branch integer,
  up geometry,
  up_done integer,
  down geometry,
  down_done integer,
  right_ geometry,
  right_done integer,
  left_ geometry,
  left_done integer
)
WITH (
  OIDS=FALSE
);
ALTER TABLE public.pipe
  OWNER TO postgres;

-- Trigger: branch on public.pipe

-- DROP TRIGGER branch ON public.pipe;

CREATE TRIGGER branch
  AFTER INSERT
  ON public.pipe
  FOR EACH ROW
  EXECUTE PROCEDURE public.branch_point();

The line column and the id column are inserted but the down column remains null.

It’s and after insert trigger so I don’t think the trigger is stopping the column down insert.

Any help would be appreciated.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121218/caecb44f/attachment.html>


More information about the postgis-users mailing list