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: grass-dev@…
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)

v.db.connect_update.diff (1.3 KB ) - added by mlennert 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by neteler, 15 years ago

Please indicate the names of the modules or a function to search for in order to identify these modules.

comment:2 by neteler, 15 years ago

Component: defaultVector

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 rblazek, 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.

comment:4 by neteler, 14 years ago

This is still an issue in http://trac.osgeo.org/qgis/ticket/1631

by mlennert, 14 years ago

Attachment: v.db.connect_update.diff added

comment:5 by mlennert, 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 neteler, 9 years ago

Milestone: 6.4.06.4.6
Note: See TracTickets for help on using tickets.