Re: reindexing sequences - Mailing list pgsql-general

From Richard Huxton
Subject Re: reindexing sequences
Date
Msg-id 009401c0bbb9$96c7e340$1001a8c0@archonet.com
Whole thread Raw
In response to reindexing sequences  ("mike" <matrix@quadrent.net>)
List pgsql-general
From: "mike" <matrix@quadrent.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


pgsql-general by date:

Previous
From: KuroiNeko
Date:
Subject: Re: Log file to sql database
Next
From: Alessio Bragadini
Date:
Subject: News gateway down?