Преглед изворни кода

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 пре 12 година
родитељ
комит
fffa661588
1 измењених фајлова са 1 додато и 1 уклоњено
  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;