Search Postgresql Archives

Re: Duplicate Unique Key constraint error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux