Search Postgresql Archives

Re: problem with serial

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

 





2012/4/19 Chris Angelico <rosuav@xxxxxxxxx>

As a side point, I would recommend against doing this. Once you've
"used" a rowid, it's not worth reusing it. You'll save yourself some
headaches down the track if you simply ignore those odd gaps (ditto
the gaps that result from rolled-back transactions) and just DELETE
the rows you're throwing out without bothering to setval the sequence
back.

Yes, for sure, however, i did this kind of workaround, because one time I've seen a rowid of 8, after an insertion even if the max(rowid) was of 42.



--
Yvon



[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