Re: Problem with sequences on a reload of a pg_dump file - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem with sequences on a reload of a pg_dump file
Date
Msg-id 29238.1085603487@sss.pgh.pa.us
Whole thread Raw
In response to Problem with sequences on a reload of a pg_dump file  (Sean Shanny <shannyconsulting@earthlink.net>)
Responses Re: Problem with sequences on a reload of a pg_dump file
List pgsql-general
Sean Shanny <shannyconsulting@earthlink.net> writes:
> My problem is that all the sequences were reset to start a 1. :-(   Did
> I do something wrong as this has never happened before?

Did the reload actually complete, or did it fail partway through?

> Also, can I
> simply figure out what the  next value should be and manually update the
> last_value column in each affected sequence?

No, but you could use setval().

            regards, tom lane

pgsql-general by date:

Previous
From: "Lee Harr"
Date:
Subject: Re: Remote X viewing of pgaccess
Next
From: Tom Allison
Date:
Subject: Re: insert/update