Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
Date
Msg-id 3B53A1C8.6076F0D6@tpf.co.jp
Whole thread Raw
In response to ALTER TABLE ADD COLUMN column SERIAL -- unexpected results  ("Rod Taylor" <rbt@barchord.com>)
Responses Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Christopher Kings-Lynne wrote:
> 
> > *ALTER TABLE* isn't as easy as *CREATE TABLE*.
> > It has another problem because it hasn't implemented
> > *DEFAULT* yet.
> 
> Just out of interest, is there a special reason it's difficult to implement
> the DEFAULT feature of alter table add column?
> 

Without *DEFAULT* we don't have to touch the table file
at all. With *DEFAULT* we have to fill the new column
with the *DEFAULT* value for all existent rows.

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: RE: pg_depend
Next
From: Tom Lane
Date:
Subject: Re: Re: SOMAXCONN (was Re: Solaris source code)