[GRASS5] Re: [GRASSLIST:9778] Re: drop column?

Wolf Bergenheim wolf+grass at bergenheim.net
Tue Jan 10 15:27:58 EST 2006


On 10/01/06 17:20, Wolfgang Qual wrote:
> Hi everybody,
> I just read that SQLITE also does not support "ALTER TABLE table DROP
> COLUMN". ("SQLite's version of the ALTER TABLE command allows the user to
> rename or add a new column to an existing table. It is not possible to
> remove a column from a table." [1]
> How to deal with this issue?

I guess we just have to live with it ):. The DBF supports even less...
An alternative could be have a command v.db.dropcol that would create a
temp table as a replica of the table in question, sans the column in
question. Not how ever that this can take a long time on a large table
(with many rows). This command could check for the driver type, and if
it sqlite of dbf then it would use the above tricks, and if it is odbc,
pg or mysql, then the column would just be dropped.

--W

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list