Re: Problem with sequences on a reload of a pg_dump file

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Shanny <shannyconsulting(at)earthlink(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with sequences on a reload of a pg_dump file
Date: 2004-05-26 20:31:27
Message-ID: 29238.1085603487@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sean Shanny <shannyconsulting(at)earthlink(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Allison 2004-05-26 21:02:02 Re: insert/update
Previous Message Lee Harr 2004-05-26 20:11:33 Re: Remote X viewing of pgaccess