Subject Re: [firebird-support] Re: Generators for auto-increment - with override
Author Ann W. Harrison
Alan McDonald wrote:
>
> between this line
>>>> if (new.TEST_ID > GEN_VALUE) then
> and this line
>>>> GEN_VALUE = gen_id(GEN_TEST_ID,new.TEST_ID - GEN_VALUE);
>
> the generator counld be fired by someone else and thus GEN_VALUE would be
> larger than expected at the third line

True, but that doesn't matter in terms of database consistency. All it
means is that you'll lose a few more generator values. The value
returned by gen_id in the second line is never used.


Regards,


Ann