Re: [ADMIN] Where is the sequence value?

Поиск
Список
Период
Сортировка
Искать

Re: [ADMIN] Where is the sequence value?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Edipo E. F. Melo"  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

FAQ