Dave Page wrote:


Hmm, it works OK (thanks), but not as you would expect. With setval's third arg = false, you can set the sequence value to 1, which is displayed as expected as the 'Current Value', but then a 'SELECT nextval()' also returns 1 which is not what you would expect (especially if you are not the same user, or you forgot what you did earlier).

But this is consistent with ALTER SEQUENCE ... RESTART ...; I just checked.

Maybe it's better not to try to allow resetting to 0 with 7,3?

Why not? 0 sounds like a legal int value to me...

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to