On Mon, 2005-03-14 at 10:02 +0100, PFC wrote:
> If you want to add a SERIAL field to an existing table, create a
> sequence
> and then create an integer field with default nextval(seq) and postgres
> will fill it automatically. The order in which it will fill it is not
> guaranteed tho
If you want to add a SERIAL field to an existing table, create a sequence
and then create an integer field with default nextval(seq) and postgres
will fill it automatically. The order in which it will fill it is not
guaranteed though !
However, you might also like to de-dupe your data once
Bernard,
If you are simply doing a one-time convert of an old database schema to a
new one, simply load the old tables into postgres and then use SQL commands
to insert the data into the new tables. For a sequence on the "existing
table," you can do as above and load the old table or just use c