From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "pgsql-sql" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Where is the sequence value? |
Date: | 2003-04-19 15:51:17 |
Message-ID: | 21918.1050767477@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
"Edipo E. F. Melo" <edipoelder(at)ig(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-19 16:16:02 | Re: OT: Why elefant? |
Previous Message | Daniel Seichter | 2003-04-19 15:47:47 | Re: OT: Why elefant? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-19 15:58:48 | Re: [SQL] Yet Another (Simple) Case of Index not used |
Previous Message | Kevin Brown | 2003-04-19 13:01:46 | Re: [SQL] Yet Another (Simple) Case of Index not used |