[GRASS-SVN] r33972 - grass/trunk/scripts/v.db.join

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 22 06:08:15 EDT 2008


Author: neteler
Date: 2008-10-22 06:08:14 -0400 (Wed, 22 Oct 2008)
New Revision: 33972

Modified:
   grass/trunk/scripts/v.db.join/v.db.join
Log:
mlennert: added layer parameter to v.db.addcol and driver and database parameters to db.execute. Thanks to aprasad. Closes bug #338 (merge from develbranch_6, r33971)

Modified: grass/trunk/scripts/v.db.join/v.db.join
===================================================================
--- grass/trunk/scripts/v.db.join/v.db.join	2008-10-22 10:00:49 UTC (rev 33971)
+++ grass/trunk/scripts/v.db.join/v.db.join	2008-10-22 10:08:14 UTC (rev 33972)
@@ -103,13 +103,13 @@
 
 i=1
 for col in $COLLIST ; do
-  v.db.addcol "$GIS_OPT_MAP" col="$col `echo $COLTYPES | cut -d' ' -f$i | tr -s '_' ' '`"
+  v.db.addcol "$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" col="$col `echo $COLTYPES | cut -d' ' -f$i | tr -s '_' ' '`"
   if [ $? -ne 0 ] ; then
 	g.message -e "Cannot continue."
 	exit 1
   fi
   echo "UPDATE $maptable SET $col=(SELECT $col
-        FROM $GIS_OPT_OTABLE WHERE $GIS_OPT_OTABLE.$GIS_OPT_OCOLUMN=$maptable.$GIS_OPT_COLUMN);" | db.execute
+        FROM $GIS_OPT_OTABLE WHERE $GIS_OPT_OTABLE.$GIS_OPT_OCOLUMN=$maptable.$GIS_OPT_COLUMN);" | db.execute driver=$driver database=$database
   i=`expr $i + 1`
 done
 



More information about the grass-commit mailing list