Re: Duplicate Unique Key constraint error - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Duplicate Unique Key constraint error
Date
Msg-id 20070713005819.GC474@alvh.no-ip.org
Whole thread Raw
In response to Re: Duplicate Unique Key constraint error  ("Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>)
List pgsql-general
Harpreet Dhaliwal escribió:
> How can one rollover a sequence back to zero after you delete records from
> a
> table with one such sequence.
> I see it starting with the last value of the sequence inserted.

You can use setval(), but normally you just leave it alone.  Having
numbers not starting from 0 is not a problem in most cases.

--
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
Hi! I'm a .signature virus!
cp me into your .signature file to help me spread!

pgsql-general by date:

Previous
From: "Harpreet Dhaliwal"
Date:
Subject: Re: Duplicate Unique Key constraint error
Next
From: "Nikolay Samokhvalov"
Date:
Subject: Re: xpath_* namespace bug