On Sun, 12 Sep 1999, Tom Lane wrote:
> > Considering how often Alter table is used, would it be reasonable to rip
> > out all the alter table code and just have it do a select into;drop;rename
>
> That would be a good route to a reimplementation, actually. Want to
> have a go at it?
Sure. I'll wade into the code and see if I can swim. I think I'll first
try to implement ALTER TABLE class_name DELETE COLUMN col_name
Which version do you suggest I work with to come up with patches?
> > Of course I wouldn't want to do this on a 5Gb table...
>
> There's probably not much choice. The current implementation avoids
> touching the data at all, but that is precisely the source of most of
> its bugs and limitations. I think most of the cases that we currently
D'oh. Now that I think about it you'd need 2n the amount of space
anyway... That brings up an intersting point... Does the database do a
rollback if it runs out of space on the device? Considering that a vacuum
is the only way to reclaim space that should mean that all queries
following should fail unless they are selects.
-Michael