Re: add column .. default - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: add column .. default
Date
Msg-id 1056032975.39060.12.camel@jester
Whole thread Raw
In response to Re: add column .. default  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: add column .. default  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2003-06-19 at 10:05, Alvaro Herrera wrote:
> On Thu, Jun 19, 2003 at 09:52:14AM -0400, Rod Taylor wrote:
> > On Thu, 2003-06-19 at 09:40, Tom Lane wrote:
>
> > Do we want them to?  If we don't mind them being executed, it is far
> > easier to:
> >
> > - alter table structure
> > - Add all new constraints (without confirming their correctness at that
> > time)
> > - update table contents via an SPI call to UPDATE WHERE <column> IS NULL
>
> Sorry, I haven't read the spec, but what happens when there is a default
> value already and it's not NULL?  Are tuples where column = default
> updated?  Are tuples where column IS NULL updated?

We're talking about add column.  Since it's a new column, there will
never be a default and all entries are NULL in PostgreSQL.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: Two weeks to feature freeze
Next
From: Rod Taylor
Date:
Subject: Re: add column .. default