[postgis-tickets] [PostGIS] #5298: CopyTopology: ERROR: TopoGeometry 14678 does not exist in the child layer 1

PostGIS trac at osgeo.org
Wed Dec 7 02:28:38 PST 2022


#5298: CopyTopology: ERROR: TopoGeometry 14678 does not exist in the child layer 1
-----------------------+---------------------------
  Reporter:  strk      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  high      |  Milestone:  PostGIS 3.3.3
 Component:  topology  |    Version:  3.3.x
Resolution:            |   Keywords:
-----------------------+---------------------------
Comment (by strk):

 I could reproduce the problem locally by running an UPDATE of relation
 records associated with primitive layers, so that they would be processed
 LAST in the INSERT query shown as context:

 {{{
 =# update topo_italia.relation set layer_id = 1 where layer_id = 1;
 UPDATE 8756
 toto=# select copytopology('topo_italia', 'topo_italia20221207');
 ERROR:  TopoGeometry 7590 does not exist in the child layer 1
 CONTEXT:  PL/pgSQL function relationtrigger() line 59 at RAISE
 SQL statement "
       INSERT INTO topo_italia20221207.relation
       SELECT * FROM topo_italia.relation
     "
 PL/pgSQL function copytopology(character varying,character varying) line
 83 at EXECUTE
 }}}

 Basically the `relationtrigger` seems to be running for each row instead
 of for each statement and it does not allow insertint a record of a
 hierarchical topogeometry BEFORE the underlying topogeometry.

 One solution should be to disable the trigger during the copy and re-
 enable it afterwards.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5298#comment:4>
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-tickets mailing list