From: Tom Lane <tgl@sss.pgh.pa.us>
To: Edipo E. F. Melo <edipoelder@ig.com.br>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Where is the sequence value?
Date: Sat, 19 Apr 2003 11:51:17 -0400
Message-ID: <21918.1050767477@sss.pgh.pa.us> (raw)
In-Reply-To: <20030419114606.564CD4758C9@postgresql.org>
References: <20030419114606.564CD4758C9@postgresql.org>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, edipoelder@ig.com.br, pgsql-admin@postgresql.org
Subject: Re: Where is the sequence value?
In-Reply-To: <21918.1050767477@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox