Thread: Re: [ADMIN] Where is the sequence value?

Re: [ADMIN] Where is the sequence value?

From
Tom Lane
Date:
"Edipo E. F. Melo" <edipoelder@ig.com.br> writes:
>    So, I set i to 1 ("setval('seq', 1)"), but in my system, when I try to insert a process, the nextval
> () returns 2, not 1.

You need to clear the is_called flag too.  See the three-parameter form
of setval():
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/functions-sequence.html

            regards, tom lane