On Fri, 2002-11-29 at 11:05, Çağıl Şeker wrote:
> I am surprised by the fact that altering tables and columns is so
> limited in PostgreSQL, this powerful DBMS! Changing column types and
> droping columns are missing important features I think.
7.3 (released yesterday) supports DROP COLUMN, as well as a bunch of
other enhancements to ALTER TABLE.
As for changing the type of a column, how would this be anything more
than syntactic sugar over renaming the existing column to a temp name,
adding a new column with the appropriate type & name, moving the data
from the old column to the new one, and dropping the old one?
Since a lot of data type changes are not obvious (how do you convert the
data from one type to another, in all cases?), I don't see a real
problem leaving this in the hands of the admin. The one exception might
be changing the length limit on a varchar(n) column, but that's such a
small case I'm not sure it's worth the bother (and can be done by
hacking the system catalogs anyway).
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC