Re: [SQL] finding (and recycling) holes in sequences

2000-06-28 Thread Erik Tennant
There is a similar discussion going on in the jonas users mailing list.. Your approach below does not appear to be thread safe. There is no guarantee that the same value will not be selected twice on two concurrent inserts.. Even more so since it sounds like he is going to be doing the maxid() and

[SQL] finding (and recycling) holes in sequences

2000-06-26 Thread Kyle Bateman
  If one has a unique-id generating sequence that sometimes is bound to have holes in it (ie: it could happen that a nextval(seq) happens without a corresponding INSERT in the table), then how could one efficiently scan for these holes to recycle them in subsequent INSERTs? I'm just looking for

[SQL] finding (and recycling) holes in sequences

2000-06-25 Thread Louis-David Mitterrand
If one has a unique-id generating sequence that sometimes is bound to have holes in it (ie: it could happen that a nextval(seq) happens without a corresponding INSERT in the table), then how could one efficiently scan for these holes to recycle them in subsequent INSERTs? I'm just looking for a "