Re: [ADMIN] Where is the sequence value? - Mailing list pgsql-sql

From Tom Lane
Subject Re: [ADMIN] Where is the sequence value?
Date
Msg-id 21918.1050767477@sss.pgh.pa.us
Whole thread Raw
List pgsql-sql
"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


pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: apparent problem with a PL
Next
From: Rajesh Kumar Mallah
Date:
Subject: [REPOST] replicable problem with PL/Perl