Search Postgresql Archives

Re: sequence advances on failed insert

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

 



On Thu, Apr 07, 2005 at 07:59:52PM -0400, Matthew Terenzio wrote:
> I'm noticing that a sequence is advancing even if the insertion
> fails.  Is this weird or expected?

It's expected.  Sequences are guaranteed to generate unique IDs.
These happen to be an increasing sequence of integers, but there is no
attempt to make this a gap-free sequence, and your apps should not
depend on the actual value of said ID.

HTH :)

Cheers,
D
-- 
David Fetter david@xxxxxxxxxx http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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