Re: resetting sequence - Mailing list pgsql-sql

From David Stanaway
Subject Re: resetting sequence
Date
Msg-id 001201c1d55d$f14b4000$0108a8c0@automaton
Whole thread Raw
In response to resetting sequence  ("Kancha ." <kancha2np@yahoo.com>)
List pgsql-sql
----- Original Message -----
From: Kancha . <kancha2np@yahoo.com>
To: <pgsql-general@postgresql.org>; <pgsql-sql@postgresql.org>
Sent: Tuesday, March 26, 2002 8:30 PM
Subject: [SQL] resetting sequence


> My sequence starts from 1 and after few months it
> should be reset to 1 again. Can this be automated ??


If the use of the sequence is predictable, you may want to alter the CYCLE
and MAXVALUE options in the seqence creation.

EG:

CREATE SEQUENCE foo MAXVALUE 3000 CYCLE;





pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: vacuum full fails: Parent tuple was not found[7.2]
Next
From: "Jairo Tcatchenco"
Date:
Subject: Vacuumdb - the real advantages