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

From Tom Lane
Subject Re: add column .. default
Date
Msg-id 8726.1056033772@sss.pgh.pa.us
Whole thread Raw
In response to Re: add column .. default  (Rod Taylor <rbt@rbt.ca>)
Responses Re: add column .. default  (Rod Taylor <rbt@rbt.ca>)
List pgsql-hackers
Rod Taylor <rbt@rbt.ca> writes:
> On Thu, 2003-06-19 at 10:05, Alvaro Herrera wrote:
>> 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 =3D 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.

That's an overly simplistic analysis, given that the column may already
exist in child tables.  I am not sure that the behavior is fully
consistent even now in such cases, but we at least should make certain
it doesn't become less consistent.
        regards, tom lane


pgsql-hackers by date:

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