[postgis-devel] [PostGIS] #950: Topology: LayerTrigger - wrong filter

PostGIS trac at osgeo.org
Fri Jun 17 14:00:24 PDT 2011


#950: Topology: LayerTrigger - wrong filter
-----------------------+----------------------------------------------------
 Reporter:  aperi2007  |       Owner:  strk         
     Type:  defect     |      Status:  assigned     
 Priority:  blocker    |   Milestone:  PostGIS 2.0.0
Component:  topology   |     Version:  trunk        
 Keywords:             |  
-----------------------+----------------------------------------------------

Comment(by aperi2007):

 strk,
 there was a few of time but at last I found the combination to cause the
 FAIL of trigger.

 {{{
 select topology.DropTopology('t2');
 select topology.DropTopology('t1');

 select 'seq_reset', setval('topology.topology_id_seq', 1, false);
 select 't1', topology.CreateTopology('t1');
 insert into t1.node(geom, containing_face) values ('POINT( 0 0)', 0);
 create table t1.l1 (id serial);
 select 't1.l1',topology.AddTopoGeometryColumn('t1', 't1', 'l1', 'g',
 'POINT');
 insert INTO t1.l1(g) VALUES (topology.CreateTopoGeom('t1', 1, 1,
 '{{1,1}}'));

 select 't2', topology.CreateTopology('t2');

 insert into t2.node(geom, containing_face) values ('POINT( 0 0)', 0);
 insert into t2.node(geom, containing_face) values ('POINT( 1 1)', 0);

 create table t2.l1 (id serial);

 select 't2.l1', topology.AddTopoGeometryColumn('t2', 't2', 'l1', 'g',
 'POINT');

 insert into t2.l1(g) VALUES (topology.CreateTopoGeom('t2', 1, 1,
 '{{1,1}}'));

 -- the trigger FAILS because the t2.relation is not empty and should
 reject the delete
 delete from t2.l1;

 -- this next comand will remove the 't2' topology from topology.layer even
 if the t2.relation table is not empty.
 -- the trigger should be reject the delete comand with "A record in
 t2.relation still references layer..."

 delete from topology.layer where topology_id=2;

 }}}

 Now I can build the regress test.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/950#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list