Subject Re: Maintaining proper generator values
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, "soso_pub" <soso_pub@y...>
wrote:
> I followed the discussion briefly and I would like to add a point. I
> think that using _only_ the GEN_ID(...) function will not generate
> duplicate values, regardless of the number of concurent conections
and
> the step of the generator per connection. This is what I concluded
> from the documentation of IB6 and this is how it should be.
> On the other hand, if you reset the value of the generator with SET
> GENERATOR to a smaller value than the current, this could cause
trouble.

Gen_Id(MyGen,:Inc) and Inc is calculated on some conditions. If
this calculation can erroneously result negative value... But in
general I agree and never encountered problems with generators myself.
Doug's approach IMHO is related not to normal database life but to
database maintenance after corruption, natural (power failure etc) or
artificial (programming or administration errors).

Best regards,
Alexander.