Opened 9 years ago
Closed 9 years ago
#3196 closed patch (fixed)
DropTopology can drop the topology extension
Reported by: | mwtoews | Owned by: | strk |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.0.8 |
Component: | topology | Version: | master |
Keywords: | Cc: |
Description
On a test database, try the following:
CREATE EXTENSION postgis_topology; SELECT topology.DropTopology('this does not exist'); -- Topology 'this does not exist' dropped SELECT topology.DropTopology('topology'); -- Topology 'topology' dropped
The first DropTopology
on a non-existing topology shows a misleading message. Either the return value should indicate that the topology does not exist or an exception should be raised.
The second DropTopology
kills the topology extension with DROP SCHEMA '||quote_ident(atopology)||' CASCADE
, which should have been avoided as topology
does not have a topoid
. This can be disastrous.
Attachments (3)
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Type: | defect → patch |
---|
A patch on trunk is ready for review. There are only minor changes, but the indent level change adds a bit of noise to the patch. This should be applied (and modified where needed) to 2.0 and 2.1 too.
comment:3 by , 9 years ago
I've added another patch that fixes a few other instances where invalid topography names are attempted. The handle_invalid_toponame.diff
patch changes these functions:
topology.DropTopology
topology.GetTopologyId
topology.AddTopoGeometryColumn
comment:5 by , 9 years ago
Status: | new → assigned |
---|
comment:6 by , 9 years ago
Milestone: | PostGIS 2.2.0 → PostGIS 2.0.8 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Generally speaking
DropTopology
can also drop other unrelated schemas.