[GRASS-dev] Re: [GRASS-user] bug in v.db.renamecol
Hamish
hamish_b at yahoo.com
Thu Feb 7 18:06:21 EST 2008
Markus Neteler wrote:
> http://trac.osgeo.org/grass/changeset/30007
...
> + # strangely "" counts as 1
> + NAMELEN=`echo "$newcol" | wc -c | awk '{print $1}'`
> + if [ "$NAMELEN" -gt 11 ] ; then
the extra char is due to the newline:
$ echo "" | wc -c
1
$ echo -n "" | wc -c
0
For v.db.renamecol + SQLite and DBF, should we add extra checks like
'v.info -c' or even compare before/after v.db.select counts to check
that new column is there and contains data before calling v.db.dropcol?
I guess it's a matter of paranoia vs. wasted redundant effort how far
you go with that.
Hamish
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the grass-dev
mailing list