From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Bob Pawley" <rjpawley(at)shaw(dot)ca> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Serial IDs |
Date: | 2007-11-14 23:39:38 |
Message-ID: | dcc563d10711141539v3f5777d7x9d20c560b929a132@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Nov 14, 2007 5:17 PM, Bob Pawley <rjpawley(at)shaw(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2007-11-14 23:41:00 | Re: PITR and warm standby setup questions |
Previous Message | Bruce Momjian | 2007-11-14 23:35:00 | Re: PITR and warm standby setup questions |