Re: resetting sequence

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: "Kancha (dot)" <kancha2np(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: resetting sequence
Date: 2002-03-27 05:30:10
Message-ID: 20020326212937.K37166-100000@teak.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2002-03-27 06:02:11 Suggestion for table/index structure?
Previous Message Kancha . 2002-03-27 02:30:39 resetting sequence

Browse pgsql-sql by date

  From Date Subject
Next Message David Stanaway 2002-03-27 07:06:37 Re: [SQL] resetting sequence
Previous Message Kancha . 2002-03-27 02:30:39 resetting sequence