Re: How to reset a sequence so it will start with 1 again?

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: How to reset a sequence so it will start with 1 again?
Дата
Msg-id D9793622-B709-4B16-86CC-A4A33250F2BA@myrealbox.com
обсуждение исходный текст
Ответ на How to reset a sequence so it will start with 1 again?  (Nico Grubert <nicogrubert@gmail.com>)
Ответы Re: How to reset a sequence so it will start with 1 again?  (Nico Grubert <nicogrubert@gmail.com>)
Список pgsql-general
On Jan 13, 2006, at 17:02 , Nico Grubert wrote:
>  SELECT setval('tblperson_id_seq', 1);

> Any idea, how I can reset the sequence so it will start with 1 again?

Take a look at the docs, in particular the three-parameter version of
setval and the is_called flag.
http://www.postgresql.org/docs/current/interactive/functions-
sequence.html

Michael Glaesemann
grzm myrealbox com




В списке pgsql-general по дате отправления:

Предыдущее
От: Nico Grubert
Дата:
Сообщение: How to reset a sequence so it will start with 1 again?
Следующее
От: "H.J. Sanders"
Дата:
Сообщение: Plans for 8.2?