Subject | Re: [ib-support] using Gen_id from a stored proc |
---|---|
Author | Ann W. Harrison |
Post date | 2001-03-24T17:02:39Z |
>On Thu, 22 Mar 2001 14:40:23 +1100, Helen Borrie wrote:At 01:56 PM 3/24/2001 -0300, Fabricio Araujo wrote:
> >
> >btw, don't write a procedure that performs its own increment on
> Gen_ID(GeneratorName,0) as suggested by somebody. This is unsafe and
> totally defeats the point
> >of using a generator which is (a) to ensure that PK values are unique
> and (b) to keep the appointment of numbers for primary key assignments
> outside transaction
> >control.
>Curious... You and AnnH seems to disagree strongly in this question. TheIn this case, we agree strongly, but aren't being clear. We
>thing that make it funny is that you both use
>quite similar arguments to justify it.
>That's why I love mailing lists. :-)
both think that
gen_id (whatever, 1)
is the right way to use generators (and it is) and that
gen_id (whatever, 0) + 1
won't work (and it won't).
Ann
Regards,
Ann
www.ibphoenix.com
We have answers.