<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hamish wrote:<br>
<blockquote cite="mid20051019122227.0cac067f.hamish_nospam@yahoo.com"
type="cite">
<pre wrap="">dumb solution to remove a column, but it should work:
db.copy select=
only those columns you want to keep. (parse `db.describe -c` in a script)
Then remove old table, rename new table, and reconnect.
(v.db.droptable, v.db.connect; v.dbselect, ?)
This could be written as a script, eg v.db.delcol
(v.db.rmcol, v.db.removecol, v.db.dropcol,...)
but again, a fairly cruddy solution. Is there a SQL command that could
be passed to db.execute?
Hamish</pre>
</blockquote>
Kirk R. Wythers wrote:
<blockquote cite="mid20051019122227.0cac067f.hamish_nospam@yahoo.com"
type="cite"></blockquote>
<blockquote cite="midC9048759-DE5A-47CA-BEF4-CFCE8E0AF2E6@umn.edu"
type="cite">
<div>
<div>On Oct 18, 2005, at 6:22 PM, Hamish wrote:</div>
<br class="khtml-block-placeholder">
<div>postgres uses something like this:</div>
<div><br class="khtml-block-placeholder">
</div>
<div><font class="Apple-style-span" face="Courier" size="4"><span
class="Apple-style-span" style="font-size: 13.8px;">ALTER TABLE
products ADD COLUMN description text;</span></font></div>
<div><br class="khtml-block-placeholder">
</div>
<div><font class="Apple-style-span" face="Courier" size="4"><span
class="Apple-style-span" style="font-size: 13.8px;">ALTER TABLE
products DROP COLUMN description;</span></font></div>
<div><br class="khtml-block-placeholder">
</div>
</div>
</blockquote>
<br>
Maybe such a (needed) script has to distinguish between DBF driver and
the<br>
other real SQL drivers?<br>
<br>
If connection == dbf then do_the_nasty_way<br>
else<br>
use the ALTER command<br>
<br>
? To implement DROP column into the DBF driver might be hard.<br>
<br>
Markus<br>
<br>
</body>
</html>