Subject | Re: [firebird-support] Re: Generators for auto-increment - with override |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-05T23:01:20Z |
Alan McDonald wrote:
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
>True, but that doesn't matter in terms of database consistency. All it
> 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
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