Re: [HACKERS] Happy column dropping

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Don Baccus <dhogaza(at)pacifier(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Happy column dropping
Date: 2000-01-25 03:31:37
Message-ID: 388D1919.DC7D369F@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue wrote:
> > Correct? (again, to see if my eyeballs and brain are working in synch
> > tonight)
> >
>
> Probably yes.
> Adding NOT NULL constraints to new column needs to apply default
> value to existent rows and this would need either implicit updation of
> existent rows or to copy into different version of the relation file. .
>
> 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.
>
> Regards.
>
> Hiroshi Inoue
> Inoue(at)tpf(dot)co(dot)jp
>

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. :-(

Mike Mascari

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-01-25 03:45:49 Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Previous Message Hiroshi Inoue 2000-01-25 03:22:44 RE: [HACKERS] Happy column dropping