Opened 14 years ago
Closed 13 years ago
#862 closed defect (wontfix)
Topology: the topology.DropTopology() drop any type of schemas
Reported by: | aperi2007 | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | topology | Version: | master |
Keywords: | Cc: |
Description
I notice the topology.DropTopology() drop always a schema.
I guess it should drop only a true topology-schema. This mean drop only a schema listed in the in the 'topology' table.
Change History (4)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
I understand your point of view.
This is pretty much like DropGeometryTable?, where the table is dropped even if it isn't advertised in geometry_columns, and even if it doesn't contain any geometric column...
You are right. let me see is they have the same paradigm: -) Have a GeometryColumn is a property of the table.
Is the same for Topology Schema ?
-) To be a topology schema is a property of a schema ?
I think you are right.
Another question is the drop rights.
leaving tha capability to drop always, perhaps (I don't know what security definer is used) but a user that cannot have the right to drop a schema using the postgres command could be drop a schema (public for example ? ) using the DropTopology only because it could have the right to execute DropTopology .
Another question is how to know if a standard schema is instead a topology-schema. Actually the only method is to do a select on others table in another schema again. Not very simple to know for a standard user.
There is a function to know if a table is a geometry table ? There is a function to know if a schema is a topology schema ?
Perhaps is the missing of these two function the problem.
comment:3 by , 14 years ago
There's structure AND metadata.
As for structure:
- if a table has a field of type GEOMETRY then it is a "geometry" table.
- if a schema has node/edge/face/relation tables with the well-known structure then is a "topology" schema (harder to tell)
As for metadata:
- every GEOMETRY table has one or more records in geometry_columns
- every topology schema has one record in topology.topology
comment:4 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The idea behind dropping indiscriminately everything was based on the fact that you _might_ have messed up with topology.topology thus missing the "blessing" of a schema as a topology.
This is pretty much like DropGeometryTable, where the table is dropped even if it isn't advertised in geometry_columns, and even if it doesn't contain any geometric column...