Subject RE: [firebird-support] Re: Complex generators?
Author Alan McDonald
> > Your are right - you cannot construct dynamic constructor names at
> the
> > server.
> Is there relly no way at all? Is gen_id a special case of a function
> or is there something else?

not that I know of - if the TYPE field is only low variety then an IF..THEN
structure could be used

> I was thinking of writing a custom UDF library for making&hadling
> generators.

good luck fiddling

> > But before we can suggest some alternatives, maybe you should tell
> us if
> > having continuous ID fields is important. I ask because if you use
> triggers
> > in this simple way, then transaction rollbacks will cause lost
> generator
> > values since generators are not subject to transaction control.
> Yes, actually it is important. I was aware of this behaviour of
> generators from some experimenging around, but I thought I could
> maybe (and very reluctantly) give up continous IDs.
> I'm seeking a solution that would would ideally keep the IDs
> sequential.

Then you had best read the article at IBPhoenix on continuous keys