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 3B5383BE.CA848BCA@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
List pgsql-hackers
Tom Lane wrote:
> 
> "Rod Taylor" <rbt@barchord.com> writes:
> > Running:
> >  ALTER TABLE table ADD COLUMN column SERIAL;
> >  Defines a column as int4 but does not create the sequence or attempt
> > to set the default value.
> 
> Yeah ... SERIAL is implemented as a hack in the parsing of CREATE
> TABLE, but there's no corresponding hack in ALTER TABLE.  A bug,
> no doubt about it, but I don't much like the obvious fix of duplicating
> the hack in two places.  Isn't there a cleaner way to deal with this
> "data type"?
> 

*ALTER TABLE* isn't as easy as *CREATE TABLE*.
It has another problem because it hasn't implemented
*DEFAULT* yet.

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_depend
Next
From: Hiroshi Inoue
Date:
Subject: Re: pg_depend