Subject | Re: [firebird-support] Generator limits |
---|---|
Author | Paul Vinkenoog |
Post date | 2006-06-02T20:43:06Z |
Hello Magni Thor Mortensen,
unique transaction numbers to feed table_2.tr, then you need *one*
generator for that column.
Greetings,
Paul Vinkenoog
(BTW, max generators in Fb2 is 32758, in 1.x it's one more. For free!
See http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
or http://www.firebirdsql.org/manual/generatorguide-basics.html#generatorguide-basics-howmany)
>>> My plan is to create a generator for each row in a table by anBecause it's silly, that's why ;-)
>>> after insert trigger.
> Why is it a bad idea ?
> I intend to use these generator to create transaction numbers forI'm not sure I understand precisely what you want, but if you need
> rows in another table:
>
> table_1
> serie PK
>
> Create trigger table_1_gen for table_1 after insert as begin
> execute statement 'create generator g_' || new.serie;
> end
>
> table_2
> serie PK (FK table 1)
> tr PK
>
> I must have a unique sequential tr number in table 2 and I thought
> it best to use generators to prevent conflicts. But I would
> appreciate any suggestions.
unique transaction numbers to feed table_2.tr, then you need *one*
generator for that column.
Greetings,
Paul Vinkenoog
(BTW, max generators in Fb2 is 32758, in 1.x it's one more. For free!
See http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
or http://www.firebirdsql.org/manual/generatorguide-basics.html#generatorguide-basics-howmany)