Re: feature request - adding columns with default value - Mailing list pgsql-general

From Tom Lane
Subject Re: feature request - adding columns with default value
Date
Msg-id 5503.1049467367@sss.pgh.pa.us
Whole thread Raw
In response to Re: feature request - adding columns with default value  (Diogo de Oliveira Biazus <diogo@ikono.com.br>)
List pgsql-general
Diogo de Oliveira Biazus <diogo@ikono.com.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


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: feature request - adding columns with default value
Next
From: Phil Mayers
Date:
Subject: Badly planned queries with JOIN syntax