Re: Serial IDs - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Serial IDs
Date
Msg-id dcc563d10711141539v3f5777d7x9d20c560b929a132@mail.gmail.com
Whole thread Raw
In response to Serial IDs  (Bob Pawley <rjpawley@shaw.ca>)
List pgsql-general
On Nov 14, 2007 5:17 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> Hi
>
> Is there any method of clearing the serial numbering so that ID references
> can start afresh without rebuilding the database.
>
> Of I use postgresql as part of my application I would like to use  pgdump to
> ensure that I have the latest version and starting the serial numbering at
> #1 would be a good thing.

Look up setval(), currval() and nextval(), the sequence manipulation functions.

setval('seqname',1,true) will reset seqname back like new.

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PITR and warm standby setup questions
Next
From: "Scott Marlowe"
Date:
Subject: Re: PITR and warm standby setup questions