RE: [HACKERS] Happy column dropping - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: [HACKERS] Happy column dropping
Date
Msg-id 001401bf6704$5ca7e3a0$2801007e@tpf.co.jp
Whole thread Raw
In response to Re: [HACKERS] Happy column dropping  (Mike Mascari <mascarm@mascari.com>)
Responses Happy column adding (was RE: [HACKERS] Happy column dropping)
List pgsql-hackers
> -----Original Message-----
> From: Mike Mascari [mailto:mascarm@mascari.com]
> 
> > 
> > Do other DBMSs allow such things ?
> > For example,in Oracle NOT NULL constraint could be specified for new
> > column only when there's no row in the table AFAIK.
> > 
> > I couldn't judge it's worth the work.
> > 
> 
> But the times when I've found it would be nice to use ALTER TABLE
> ADD COLUMN with NOT NULL constraints is in development mode when
> the schema is changing rapidly and there actually isn't any data
> yet in the tables. Otherwise, to add a new NOT NULL column during
> a development cycle, one has to drop and recreate the table, all
> triggers, comments, etc. Its just a real pain. :-(
>

I don't know details about constraints.
Probably you could implement it better than me.

Even default is not allowed in ADD COLUMN now. 
There may be other reasons why they aren't allowed.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp 


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Happy column dropping
Next
From: Adriaan Joubert
Date:
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace