Make an id field max(id)+1 rather than SERIAL - Mailing list pgsql-novice

From Rory Campbell-Lange
Subject Make an id field max(id)+1 rather than SERIAL
Date
Msg-id 20020919141417.GB6565@campbell-lange.net
Whole thread Raw
Responses Re: Make an id field max(id)+1 rather than SERIAL  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-novice
I have problems after exporting then importing data into newly created
databases that the sequence and the indexed serial fields get out of
alignment.

I wonder if it isn't better to always simply insert ids using some sort
of function or other procedure to calculate on each insert a new unique
id number.

Is this feasible?

Thanks for any help.
Rory

--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

pgsql-novice by date:

Previous
From: Ciprian Popovici
Date:
Subject: Re: restricting similar rows
Next
From: Oliver Elphick
Date:
Subject: Re: Make an id field max(id)+1 rather than SERIAL