RE: [GRASS-dev] v.db.dropcol added

Hi Markus,

I looked at you script without actually running it. I have a few
questions (which may or may not be good).

(1) You check for an error in the non-sqlite case. Shouldn't you also
check in the sqlite case?

(2) If there is an error, the script exits before erasing the TMP files.
Shouldn't you erase these even if there is an error?

(3) I think you missed $TMP.coldesc. You want to erase that one too?

Thanks for all your hard work.

John

-----Original Message-----
From: grass-dev-bounces@grass.itc.it
[mailto:grass-dev-bounces@grass.itc.it] On Behalf Of Markus Neteler
Sent: Monday, February 05, 2007 8:27 AM
To: grass developers list
Subject: [GRASS-dev] v.db.dropcol added

Hi,

thanks to the new ALTER TABLE DROP COLUMN addition for the
DBF driver, I have submitted a new "v.db.dropcol" script to
CVS. It includes extra code for SQLite DBs since SQLite
doesn't originally support column dropping. Using
"v.db.dropcol", however, you can drop columns in any GRASS
table connected to a vector map. Testing obviously welcome.

cheers
Markus

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Hi John,

On Mon, Feb 05, 2007 at 11:48:24AM -0500, John Gillette wrote:

Hi Markus,

I looked at you script without actually running it. I have a few
questions (which may or may not be good).

excellent observations!

(1) You check for an error in the non-sqlite case. Shouldn't you also
check in the sqlite case?

Sure. Fixed.

(2) If there is an error, the script exits before erasing the TMP files.
Shouldn't you erase these even if there is an error?

Yep. Also fixed (now with common cleanup() function).

(3) I think you missed $TMP.coldesc. You want to erase that one too?

Right. Fixed.

Thanks for all your hard work.

Thanks for your feedback! Updated in CVS.

Markus

John

> -----Original Message-----
> From: grass-dev-bounces@grass.itc.it
> [mailto:grass-dev-bounces@grass.itc.it] On Behalf Of Markus Neteler
> Sent: Monday, February 05, 2007 8:27 AM
> To: grass developers list
> Subject: [GRASS-dev] v.db.dropcol added
>
> Hi,
>
> thanks to the new ALTER TABLE DROP COLUMN addition for the
> DBF driver, I have submitted a new "v.db.dropcol" script to
> CVS. It includes extra code for SQLite DBs since SQLite
> doesn't originally support column dropping. Using
> "v.db.dropcol", however, you can drop columns in any GRASS
> table connected to a vector map. Testing obviously welcome.
>
> cheers
> Markus
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>