From: David Stanaway <David@Stanaway.net>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] resetting sequence
Date: Wed, 27 Mar 2002 01:06:37 -0600
Message-ID: <001201c1d55d$f14b4000$0108a8c0@automaton> (raw)
References: <20020327023039.13665.qmail@web14914.mail.yahoo.com>
----- 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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: David@Stanaway.net, pgsql-general@postgresql.org
Subject: Re: [SQL] resetting sequence
In-Reply-To: <001201c1d55d$f14b4000$0108a8c0@automaton>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox