Alter Table Serial

Поиск
Список
Период
Сортировка
От Eft, Aaron
Тема Alter Table Serial
Дата
Msg-id D5261D5A4D81D51188B3000255FC111204B78887@amer31.avnet.com
обсуждение исходный текст
Список pgsql-novice
Wondering if this is possible:

I'm trying to add a column to an existing database. This column would be
autoincrementing in the form of "bigserial". Now, since there are already
70,000 records in the database, I'd also like to have this assign a serial
number to those too, but understand if this is not possible. So far,
everything I've tried has come up with the message:

NOTICE:  ALTER TABLE will create implicit sequence 'shipper_serial_seq' for
SERIAL column 'shipper.serial'

NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
'shipper_serial_key' for table 'shipper'

ERROR:  Adding columns with defaults is not implemented.

        Add the column, then use ALTER TABLE SET DEFAULT.


I'm still very new to this, so any help is greatly appreciated.

Thanks!

--= Aaron Eft =--
    60 S McKemy
Chandler, AZ 85226
   (480) 961-6407



В списке pgsql-novice по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: PHP & Postgres
Следующее
От: "Henshall, Stuart - WCP"
Дата:
Сообщение: Re: Alter Table Serial