Re: How to reset a sequence so it will start with 1 again? - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: How to reset a sequence so it will start with 1 again?
Date
Msg-id D9793622-B709-4B16-86CC-A4A33250F2BA@myrealbox.com
Whole thread Raw
In response to How to reset a sequence so it will start with 1 again?  (Nico Grubert <nicogrubert@gmail.com>)
Responses Re: How to reset a sequence so it will start with 1 again?
List 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 by date:

Previous
From: Nico Grubert
Date:
Subject: How to reset a sequence so it will start with 1 again?
Next
From: "H.J. Sanders"
Date:
Subject: Plans for 8.2?