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

From Nico Grubert
Subject Re: How to reset a sequence so it will start with 1 again?
Date
Msg-id 43C766F3.2070907@gmail.com
Whole thread Raw
In response to Re: How to reset a sequence so it will start with 1 again?  (Michael Glaesemann <grzm@myrealbox.com>)
List pgsql-general
> 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

Thanks Michael,

SELECT setval('tblperson_id_seq', 1, false);
will do exactly what I supposed to get.

Nico

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: How to reset a sequence so it will start with 1 again?
Next
From: Michael Fuhr
Date:
Subject: Re: Plans for 8.2?