Alter Table Serial - Mailing list pgsql-novice

From Eft, Aaron
Subject Alter Table Serial
Date
Msg-id D5261D5A4D81D51188B3000255FC111204B78887@amer31.avnet.com
Whole thread Raw
List 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 by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: PHP & Postgres
Next
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: Alter Table Serial