Opened 9 years ago

Closed 9 years ago

#3016 closed defect (fixed)

DropTopology raises an exception on corrupted topology schema

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.1.6
Component: topology Version: 2.1.x
Keywords: Cc:

Description

When a topology is registered in topology.topology and has layers registered in topology.layer but its schema is corrupted (misses a relation table) then the DropTopology function raises an exception.

I think it should just clear whatever it can and be done.

Change History (2)

comment:1 by strk, 9 years ago

The exception comes from the attempt to drop the registered (but missing) layers:

NOTICE:  Dropping all layers from topology topo_235bis (1295)
ERROR:  relation "topo_235bis.relation" does not exist
LINE 1: DELETE FROM topo_235bis.relation  WHERE layer_id = 1
                    ^
QUERY:  DELETE FROM topo_235bis.relation  WHERE layer_id = 1
CONTEXT:  PL/pgSQL function droptopogeometrycolumn(character varying,character varying,character varying) line 33 at EXECUTE statement
SQL statement "SELECT topology.DropTopoGeometryColumn('topo_235bis','LAYER1','')"
PL/pgSQL function droptopology(character varying) line 22 at EXECUTE statement

comment:2 by strk, 9 years ago

Resolution: fixed
Status: newclosed

r13189 in trunk, r13190 in 2.1 branch

Note: See TracTickets for help on using tickets.