Opened 13 years ago
Last modified 3 years ago
#1185 new enhancement
Need DropTopoGeometryTable function
Reported by: | robe | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | topology | Version: | master |
Keywords: | usability | Cc: |
Description
Such a function should drop the table and remove all related relation records.
Change History (7)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Milestone: | PostGIS 2.0.0 → PostGIS 2.1.0 |
---|
comment:5 by , 3 years ago
Keywords: | usability added |
---|
comment:6 by , 3 years ago
I shall notice that the current DropTopoGeometryColumn does indeed get rid of the entries in the associated topology relation table, so my observations in previous comment are too cautious. I think it's ok to provide a DropTopoGeometryTable with interface like https://postgis.net/docs/DropGeometryTable.html
comment:7 by , 3 years ago
On further thought, I noticed that DropGeometryTable would drop a table with TopoGeometry columns w/out even blinking. Maybe we could add the special support of dropping the TopoGeometry column directly in that function ?
Technically, a TopoGeometry is independent from the table it's attached to. You may have literal TopoGeometry values, or have them used in multiple places.
Substancially a TopoGeometry is fully defined by the relation table AND the layer record (which specifies how to interpret the definition). Dropping the layer record makes indeed the TopoGeometry definition useless.
I agree on implementing DropTopoGeometryTable, but I feel the need to somehow validate TopoGeometry object references (the topology.TopoGeometry object type) to catch malformations like the ones introduced by, for instance, saving a TopoGeometry object in a private/backup table and then dropping the referee using this function thus making the copied TopoGeometry a dangling reference.