Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group