Explorar o código

vlib/PostGIS Topology: fix `topology.grass` definition (allow overwrite)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54001 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=12) %!d(string=hai) anos
pai
achega
fffa661588
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/vector/Vlib/build_pg.c

+ 1 - 1
lib/vector/Vlib/build_pg.c

@@ -335,7 +335,7 @@ int create_topo_grass(const struct Format_info_pg *pg_info)
 
     /* add constraint */
     sprintf(stmt, "ALTER TABLE \"%s\".\"%s\" ADD CONSTRAINT \"%s_%s_fkey\" "
-	    "FOREIGN KEY (%s) REFERENCES topology.topology(id)",
+	    "FOREIGN KEY (%s) REFERENCES topology.topology(id) ON DELETE CASCADE",
 	    TOPO_SCHEMA, TOPO_TABLE, TOPO_TABLE, TOPO_ID, TOPO_ID);
     if (Vect__execute_pg(pg_info->conn, stmt) == -1) {
 	return -1;