Re: Corrupted sequences - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Corrupted sequences
Date
Msg-id 20030314151833.L31492-100000@zoraida.natserv.net
Whole thread Raw
In response to Re: Corrupted sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Fri, 14 Mar 2003, Tom Lane wrote:

> Francisco Reyes <lists@natserv.com> writes:
> > Got 2 corrupted sequences, that I have discovered so far, and fixed them
> > with 'setval'. Is there a way to check all sequences in a database?
>
> ?? Define "corrupted" ...


One returned a number, 12, much lower than the next value it should have
used 3,706.

Another set of sequences are returning
sequence_name.currval is not yet defined in this session.

If I use setcurrval(sequence,nextvalue) it fixes the problem.


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: The folding of unquoted names to lower case in PostgreSQL
Next
From: Francisco Reyes
Date:
Subject: Re: Corrupted sequences