Hi to my knowledge no DBMI function exists yet to check if a column exists in (vector) table.
Suggestions: db_get_column(driver, hcolumn,key, &column); if (!column) G_fatal_error(_("Missing column <%s> in table <%s>"), hcolumn, table); Or this one (used in r50492, here modified): if ((col_type = db_column_Ctype(Driver, table, column)) == -1) G_fatal_error(_("Column <%s> not found in table <%s>"), column, table); I am not familiar enough with DBMI but do see the need to have such a function. Rationale: the SQLite backend happily accepts nonsensical names and the test should become a single line rather than the currently used workarounds in v.to.rast/support.c or v.extrude/main.c or the like. Markus _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev