Re: AW: ALTER TABLE DROP COLUMN - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: AW: ALTER TABLE DROP COLUMN
Date
Msg-id 39EABA75.5302C51A@tpf.co.jp
Whole thread Raw
In response to RE: AW: ALTER TABLE DROP COLUMN  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers

Chris wrote:

> Hiroshi Inoue wrote:
>
> > When I used Oracle,I saw neither option of DROP
> > COLUMN feature. It seems to tell us that the
> > implementation isn't
> > that easy. It may not be a bad choise to give up DROP
> > COLUMN feature forever.
>
> Because it's not easy we shouldn't do it? I don't think so. The perfect
> solution is lazy updating of tuples but it requires versioning of
> meta-data and that requires a bit of work.
>
> > However I would strongly object to 2x
> > ADD COLUMN if such implementations are proposed.
>
> Not even 2x for ADD COLUMN DEFAULT ?

Certainly it would need 2x.
However is ADD COLUMN DEFAULT really needed ?
I would do as follows.
   ADD COLUMN (without default)   UPDATE .. SET new_column = new default   ALTER TABLE ALTER COLUMN SET DEFAULT

Regards.
Hiroshi Inoue




pgsql-hackers by date:

Previous
From: Chris
Date:
Subject: Re: AW: ALTER TABLE DROP COLUMN
Next
From: Chris
Date:
Subject: Re: AW: ALTER TABLE DROP COLUMN