Search Postgresql Archives

Re: serial increments on failed insert

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

 



On Fri, Jan 14, 2005 at 17:49:42 -0800,
  Steve Atkins <steve@xxxxxxxxxxx> wrote:
> 
> That's correct, documented behaviour. A serial column is mostly just a
> sequence in disguise. A sequence is guaranteed to give unique,
> increasing values, but in many cases may miss a value (for several
> reasons - in this case because once a sequence value is used, it's
> used, even if the transaction it was used in is rolled back).

Note that the increasing part is only guarenteed within a session,
not accross sessions and only if you haven't changed the sequence
to allow it to roll over.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[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