[postgis-devel] [PostGIS] #1371: postgis_restore.pl: insert or update on table "layer" violates foreign key constraint "layer_topology_id_fkey"

PostGIS trac at osgeo.org
Tue Dec 13 10:01:49 PST 2011


#1371: postgis_restore.pl: insert or update on table "layer" violates foreign key
constraint "layer_topology_id_fkey"
----------------------+-----------------------------------------------------
 Reporter:  strk      |       Owner:  strk         
     Type:  defect    |      Status:  new          
 Priority:  medium    |   Milestone:  PostGIS 2.0.0
Component:  topology  |     Version:  trunk        
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by strk):

 Ok, here's the thing:
 the _definition_ of layer and topology tables comes from the topology.sql
 script, not from the dump. This means it is equipped with constraints.

 If we restored the tables from the dump we'd get the constraints added
 later and so wouldn't
 break them.

 I guess this was a problem with geometry_columns as well before it became
 a view.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1371#comment:2>
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