CopyTopology — Makes a copy of a topology structure (nodes, edges, faces, layers and TopoGeometries).


integer CopyTopology(varchar existing_topology_name, varchar new_name);


Creates a new topology with name new_topology_name and SRID and precision taken from existing_topology_name, copies all nodes, edges and faces in there, copies layers and their TopoGeometries too.


The new rows in topology.layer will contain synthesized values for schema_name, table_name and feature_column. This is because the TopoGeometry will only exist as a definition but won't be available in any user-level table yet.

Availability: 2.0.0


This example makes a backup of a topology called ma_topo

SELECT topology.CopyTopology('ma_topo', 'ma_topo_bakup');

See Also

Section 4.3.1, “The SPATIAL_REF_SYS Table and Spatial Reference Systems”, CreateTopology