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

From Vijay Deval
Subject Re: Make an id field max(id)+1 rather than SERIAL
Date
Msg-id 3D8DE9D2.24EA417A@giaspn01.vsnl.net.in
Whole thread Raw
In response to Make an id field max(id)+1 rather than SERIAL  (Rory Campbell-Lange <rory@campbell-lange.net>)
List pgsql-novice
Hi
after inserting bulk data, Select Max of the sequence.

SELECT setval('abc_xyz_seq', max value);

should get the sequence in synchro.

Vijay

Rory Campbell-Lange wrote:
>
> I have problems after exporting then importing data into newly created
> databases that the sequence and the indexed serial fields get out of
> alignment.


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: table corruption... :(
Next
From: "Norman Khine"
Date:
Subject: Subselect query for a multi table insert single query