Thread: Bug #551: alter table add field serial - does not create serial field
Bug #551: alter table add field serial - does not create serial field
From
pgsql-bugs@postgresql.org
Date:
wolfgang fuertbauer (w.fuertbauer@eunet.at) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description alter table add field serial - does not create serial field Long Description altering an existing table and adding a field from type serial via >>alter table test add (s serial);<< does not add a serial, but an integer field. Sample Code create table t (t text); CREATE \d t Table "t" Attribute | Type | Modifier -----------+------+---------- t | text | alter table t add s serial; ALTER \d t Table "t" Attribute | Type | Modifier -----------+---------+---------- t | text | s | integer | No file was uploaded with this report
Yes, this is a known bug: From TODO list: o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence --------------------------------------------------------------------------- pgsql-bugs@postgresql.org wrote: > wolfgang fuertbauer (w.fuertbauer@eunet.at) reports a bug with a severity of 3 > The lower the number the more severe it is. > > Short Description > alter table add field serial - does not create serial field > > Long Description > altering an existing table and adding a field from type serial via > > >>alter table test add (s serial);<< > > does not add a serial, but an integer field. > > Sample Code > create table t (t text); > CREATE > \d t > Table "t" > Attribute | Type | Modifier > -----------+------+---------- > t | text | > > alter table t add s serial; > ALTER > > \d t > Table "t" > Attribute | Type | Modifier > -----------+---------+---------- > t | text | > s | integer | > > > No file was uploaded with this report > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026