Subject RE: [firebird-support] generator columns as 64-bit values required?
Author Alan McDonald
>
> I was looking at the IB pdf data definition guide about generators,
> and they say the following:
>
> Generators return a 64-bit value. You should define the column that
> holds the generated
> value as an ISC_INT64 variable (DECIMAL or NUMERIC datatype).
>
> In my case however, I have many columns that I will programmatically
> limit to values MUCH smaller than I'd have to worry about with an
> INT64. (e.x. 1000, etc). In this case, should I still use an INT64
> for convention's sake, or would I better off using a SMALLINT in my
> field and implicitly casting down from 64->16 bits?
>
> Thanks,
>
> Robby
>

you can make a primary key column a smallint if you want - the generator
value created will be cast down to that size without problem.
Alan