Creating a new column with SERIAL as data type

Поиск
Список
Период
Сортировка
Искать
От
Kumar S
Тема
Creating a new column with SERIAL as data type
Дата
Msg-id
20040920021521.22010.qmail@web61206.mail.yahoo.com
Список
Дерево обсуждения
Creating a new column with SERIAL as data type Kumar S <ps_postgres@yahoo.com>
Re: Creating a new column with SERIAL as data type Tom Lane <tgl@sss.pgh.pa.us>
Re: Creating a new column with SERIAL as data type Kumar S <ps_postgres@yahoo.com>
Hi group,
 I have an existing table with data loaded. Now I
wanted to create a column with SERIAL data type and
want to make that coulmn values as PRIMARY key. 

I did the following:
friends=> alter table friend  add column fr_id serial;
NOTICE:  ALTER TABLE will create implicit sequence
"friend_fr_id_seq" for "serial" column "friend.fr_id"
ERROR:  adding columns with defaults is not
implemented
HINT:  Add the column, then use ALTER TABLE SET
DEFAULT.

Can any one suggest what is wrong here. 

Thanks
Kumar



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
В списке pgsql-novice по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: DST and time zones
От: Tom Lane
Дата:
FAQ