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

From: Nico Grubert <nicogrubert(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to reset a sequence so it will start with 1 again?
Date: 2006-01-13 08:38:11
Message-ID: 43C766F3.2070907@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-01-13 08:49:02 Re: Plans for 8.2?
Previous Message Michael Fuhr 2006-01-13 08:37:33 Re: How to reset a sequence so it will start with 1 again?