Opened 15 years ago
Last modified 9 years ago
#982 new defect
Vector modules changing db should call Vect_set_db_updated
Reported by: | rblazek | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.6 |
Component: | Vector | Version: | unspecified |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | Unspecified |
Description
All vector modules which modify its attribute table (structure or data) should call Vect_set_db_updated like v.what.rast for example does.
It involves most v.db.* modules.
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Component: | default → Vector |
---|
The original QGIS bug (http://trac.osgeo.org/qgis/ticket/1631) mentions v.db.addcol which is a script. Hence, Vect_set_db_updated() cannot be called. It appears that the function calls Vect_write_dblinks(Map) which modifies the dbln file (http://download.osgeo.org/grass/grass6_progman/field_8c_source.html#l00690).
Question: would a "touch /path/to/vector/mapname/dbln" be sufficient to indicate the dbln file as updated?
comment:3 by , 15 years ago
Yes, touch would work but:
- Is it portable? I think that it is always better to avoid UNIX specific commands even if it is already requirement.
- It is maybe better to keep functionality in one place. An option can be added to v.db.connect, Vect_set_db_updated() called form v.db.connect and v.db.connect called from scripts.
by , 14 years ago
Attachment: | v.db.connect_update.diff added |
---|
comment:5 by , 14 years ago
See attached patch for an implementation of Radim's suggestion of adding a flag to v.db.connect which call Vect_set_db_updated(). Scripts that change the attibute file could then call 'v.db.connect -u map=' to signal the update of the attribute file.
The diff is against dev6, but should be easily applicable in the other branches.
Moritz
comment:6 by , 9 years ago
Milestone: | 6.4.0 → 6.4.6 |
---|
Please indicate the names of the modules or a function to search for in order to identify these modules.