[GRASS-SVN] r60350 - grass/branches/releasebranch_7_0/vector/v.sample

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 19 13:41:30 PDT 2014


Author: neteler
Date: 2014-05-19 13:41:30 -0700 (Mon, 19 May 2014)
New Revision: 60350

Modified:
   grass/branches/releasebranch_7_0/vector/v.sample/main.c
Log:
v.sample: use DB TRANSACTION to speed up

Modified: grass/branches/releasebranch_7_0/vector/v.sample/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.sample/main.c	2014-05-19 20:40:56 UTC (rev 60349)
+++ grass/branches/releasebranch_7_0/vector/v.sample/main.c	2014-05-19 20:41:30 UTC (rev 60350)
@@ -172,6 +172,7 @@
 	G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
 		      Fi->database, Fi->driver);
 
+    db_begin_transaction(Driver);
     sprintf(buf,
 	    "create table %s ( cat integer, pnt_val double precision, rast_val double precision, "
 	    "diff double precision)", Fi->table);
@@ -256,6 +257,7 @@
 	Vect_write_line(&Out, GV_POINT, Points, Cats);
     }
 
+    db_commit_transaction(Driver);
     db_close_database_shutdown_driver(Driver);
 
     Rast_close(fdrast);



More information about the grass-commit mailing list