On Fri, 14 Mar 2003, Tom Lane wrote:
> Francisco Reyes <lists(at)natserv(dot)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.