|
@@ -30,8 +30,8 @@ int update(struct Map_info *Map)
|
|
|
if ((Fi = Vect_get_field(Map, options.field)) == NULL)
|
|
|
G_fatal_error(_("Database connection not defined for layer %d. Use v.db.connect first."),
|
|
|
options.field);
|
|
|
- G_debug(3, "Reading from map <%s>, query layer %d: updating table <%s>, column <%s>",
|
|
|
- options.name, options.qfield, Fi->table, Fi->key);
|
|
|
+ G_debug(3, "Reading from map <%s>, query layer %d (table <%s>): updating table <%s>, column <%s>",
|
|
|
+ options.name, options.qfield, qFi->table, Fi->table, Fi->key);
|
|
|
|
|
|
/* Open driver */
|
|
|
driver = db_start_driver_open_database(Fi->driver, Fi->database);
|
|
@@ -44,6 +44,7 @@ int update(struct Map_info *Map)
|
|
|
|
|
|
/* select existing categories to array (array is sorted) */
|
|
|
vstat.select = db_select_int(driver, qFi->table, Fi->key, NULL, &catexst);
|
|
|
+ G_debug(3, "Existing categories: %d", vstat.select);
|
|
|
|
|
|
/* create beginning of stmt */
|
|
|
switch (options.option) {
|
|
@@ -69,8 +70,6 @@ int update(struct Map_info *Map)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- G_debug(3, "Existing categories: %d", vstat.rcat);
|
|
|
-
|
|
|
/* update */
|
|
|
G_message(_("Updating database..."));
|
|
|
for (i = 0; i < vstat.rcat; i++) {
|