Re: reindexing sequences

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "mike" <matrix(at)quadrent(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: reindexing sequences
Date: 2001-04-02 21:02:57
Message-ID: 009401c0bbb9$96c7e340$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: "mike" <matrix(at)quadrent(dot)net>

is there a way to reindex a sequence?
if so how and is it in the curent docs?

Mike

Reindex a sequence? Not sure what you mean by that. You can set the value to
something else:

select setval('mysequence',12345);

If you mean compact the values used so there aren't any gaps in the
sequence - no there's nothing that does that. There's not really any way for
Postgres to know what you've done with the sequence values.

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Radlow 2001-04-02 21:35:48 Re: Cascading deletes with rules in 7.0.3: why doesn't this work?
Previous Message Tom Lane 2001-04-02 20:41:39 Re: reindexing sequences