[postgis-tickets] [PostGIS] #5118: DropTopology: ERROR: update or delete on table "topology" violates foreign key constraint "layer_topology_id_fkey" on table "layer"
PostGIS
trac at osgeo.org
Mon Mar 28 05:15:14 PDT 2022
#5118: DropTopology: ERROR: update or delete on table "topology" violates foreign
key constraint "layer_topology_id_fkey" on table "layer"
-----------------------+---------------------------
Reporter: strk | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.3.0
Component: topology | Version: 3.2.x
Resolution: | Keywords:
-----------------------+---------------------------
Comment (by strk):
The reason why relation table is not cleaner up is because both relation
cleanup and sequence removal are in the same sub-transaction, and the
absence of the sequence rollsback the relation table cleanup:
{{{
xxx=# SELECT topology.DropTopoGeometryColumn('features', 'land_parcels',
'feature');
WARNING: Executing: DELETE FROM city_data.relation WHERE layer_id = $1
WARNING: $1 is city_data
WARNING: Executing: DROP SEQUENCE city_data.topogeo_s_1
WARNING: $1 is city_data
WARNING: $2 is 1
NOTICE: sequence "topogeo_s_1" does not exist
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5118#comment:7>
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