Closed robe2 closed 7 years ago
@robe2 Trying to reproduce the problem with this code:
SELECT pgr_CreateTopology('edge_table', 0.001, 'the_geom', 'id', clean:true);
ALTER TABLE edge_table RENAME TO mbta_arc;
CREATE TABLE edge_table AS SELECT * FROM mbta_arc;;
SELECT pgr_CreateTopology('edge_table', 0.001, 'the_geom', 'id', clean:true);
Expected behavior and actual behavior
If you run create topology and had an old table that has the same index names, you get error
` NOTICE: Unexpected error column "cname" does not exist
`
I think the problem is createtopology is not checking if an index name is already in use, and blindly creates indexes it sees missing.
Index names have to be unique within a schema. Though though logic might just be an error in its checking of names when it's inspecting the catalog
e.g. if idx_mbta_lines_source exists as an index, and it decide new table should have an index with that name
Steps to reproduce the problem
Specifications like the version of pgRouting/PostGIS and PostgreSQL as well as Operating System
Use the commands: