Re: Help with ADD COLUMN

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Help with ADD COLUMN
Date: 2002-11-24 14:24:45
Message-ID: 1038147884.65346.6.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2002-11-24 at 11:14, Hannu Krosing wrote:
> On Sun, 2002-11-24 at 08:34, Philip Warner wrote:
> > At 03:48 PM 23/11/2002 -0800, Christopher Kings-Lynne wrote:
> > >I assume that's the correct behaviour? If they specify a default, the
> > >column should be auto-filled with that default, right?
> >
> > Good question. We might want some input from other DBs; Dec RDB default
> > existing rows to NULL irrespective of the 'DEFAULT' clause.
>
> Also, how would I express a new column with default for which I _want_
> that column in old records to be NULL ?

Same way as you do now. Add the column, then alter in the default.

--
Rod Taylor <rbt(at)rbt(dot)ca>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-11-24 16:14:01 Re: Help with ADD COLUMN
Previous Message Philip Warner 2002-11-24 06:34:22 Re: Help with ADD COLUMN