Re: [SQL] resetting sequence

From: "Andrew G(dot) Hammond" <drew(at)xyzzy(dot)dhs(dot)org>
To: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
Cc: "Kancha (dot)" <kancha2np(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] resetting sequence
Date: 2002-03-27 15:07:00
Message-ID: 20020327150700.GB7777@xyzzy.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

It also looks like you might want to check out the unix cron utility.
From your shell prompt, try
man crontab

On Tue, Mar 26, 2002 at 09:30:10PM -0800, Philip Hallstrom wrote:
> take a look at the SETVAL function... it's something close to:
>
> SELECT SETVAL('sequence_name', 1);
>
> something like that. check the manual.
>
> On Tue, 26 Mar 2002, Kancha . wrote:
>
> > My sequence starts from 1 and after few months it
> > should be reset to 1 again. Can this be automated ??
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy Awards
> > http://movies.yahoo.com/
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Andrew G. Hammond mailto:drew(at)xyzzy(dot)dhs(dot)org http://xyzzy.dhs.org/~drew/
56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F 613-389-5481
5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2002-03-27 15:15:46 Re: View vs. direct Table access
Previous Message Doug McNaught 2002-03-27 15:01:51 Re: Difference between text and char(n)?

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew G. Hammond 2002-03-27 15:23:14 Re: Problem how to combine to two tables
Previous Message Jairo Tcatchenco 2002-03-27 15:01:56 Vacuumdb - the real advantages