Re: feature request - adding columns with default value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Diogo de Oliveira Biazus <diogo(at)ikono(dot)com(dot)br>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: feature request - adding columns with default value
Date: 2003-04-04 14:42:47
Message-ID: 5503.1049467367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Diogo de Oliveira Biazus <diogo(at)ikono(dot)com(dot)br> writes:
> Henrik Steffen wrote:
>> i would suggest to change the "alter table add column" function to
>> adding a default value while adding the column if this is possible
>> and if this minimizes "down-time".

> Maybe I'm wrong, but this feature was supported in 7.1,
> and it was removed in 7.2.

THe old implementation was really equivalent to "alter table add column"
followed by "set default", because it didn't touch the actual rows
(the implied new column stayed NULL). That's not what the command
should do per SQL spec, so we took it out until we get around to
implementing the spec-compliant behavior. The current behavior conforms
to spec as far as it goes.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message nolan 2003-04-04 14:47:56 Generating consecutive sequence values
Previous Message Stephan Szabo 2003-04-04 14:42:15 Re: feature request - adding columns with default value