>>>>> "Michael" == Michael Lackhoff <[EMAIL PROTECTED]> writes:
Michael> Is there an idiom for this kind of task? And how can I do it with Michael> RDBO? You will never have perfectly sequenced numbers, unless you're willing to accept a fairly serious slowdown in assigning those numbers. The biggest problem is rolled-back transactions: if the transaction might involve your incremented number, you will have to serialize the entire transaction by locking the table providing the sequential number. The method that postgresql uses to allocate "serial" numbers is to hand out a "block" to each process, and then allocate from there. This means the numbers won't necesarily be sequential, or in order, but they will be guaranteed distinct. I hope your business rules permit such a sequence, because the alternative is horrible performance. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object