[GRASS-user] v.db.addclo + sqlite

Hi all,

I'm using GRASS 6.2.1 from Jachym Ubuntu repositories and v.db.addcol
with sqlite is behaving strangely.

First I created some random points (v.random) and created a table for
it in a sqlite database (v.db.addtable pontos). The table with the cat
col gets created OK. Now I want to sample some rasters with the points
so I first create a new column (v.db.addcol map=pontos column="teste
INT") and I get the following:

---------------------------------------------------
GRASS 6.2.1 (amazon):~/modis > v.db.addcol map=pontos column="teste INT"
/usr/lib/grass/scripts/v.db.addcol: 96: let: not found
DBMI-SQLite driver error:
Error in sqlite3_prepare():
duplicate column name: teste

ERROR: Error while executing: "ALTER TABLE pontos ADD COLUMN teste INT
       "
ERROR: Cannot continue (problem adding column).
---------------------------------------------------

Funny thing is that the column does get created. I can see it with db.columns

Now, if I create the column with db.execute no error occurs.

I saw a similar problem reported last year but no solution in the mail tread.

Thanks
Daniel

Daniel,

Daniel Victoria wrote:

Hi all,

I'm using GRASS 6.2.1 from Jachym Ubuntu repositories and v.db.addcol
with sqlite is behaving strangely.

First I created some random points (v.random) and created a table for
it in a sqlite database (v.db.addtable pontos). The table with the cat
col gets created OK. Now I want to sample some rasters with the points
so I first create a new column (v.db.addcol map=pontos column="teste
INT") and I get the following:

---------------------------------------------------
GRASS 6.2.1 (amazon):~/modis > v.db.addcol map=pontos column="teste INT"
/usr/lib/grass/scripts/v.db.addcol: 96: let: not found
...

That's the problem: "let not found". It was a bash-ism (shell script bug)
which
was fixed later. You can simply grab v.db.addcol from 6.2.2 (which we should
release
asap, or take the release candidate which works apparently fine).

Markus
--
View this message in context: http://www.nabble.com/v.db.addclo-%2B-sqlite-tf3985632.html#a11319833
Sent from the Grass - Users mailing list archive at Nabble.com.