Subject | RE: [ib-support] ato increment / IDENTITY |
---|---|
Author | Ray Drew |
Post date | 2001-06-13T10:01:31Z |
Helen wrote
won't fit into it.
I'm using Firebird 0.9 executable dated 29/12/00 on Windows NT. I'm using
Dialect 3.
The behaviour of this release is that you _can_ define columns as pk's using
a smallint or int data type and use generators to populate them. If the
generated value exceeds the data type's limit then an error will result. So,
if the genrator produces 32,768 for a column defined as smallint an error
will occur. If your pk is never going to reach the data type's limit, there
is no reason to use 8 bytes to store it, unless you want a bloated and slow
database.
Am I missing something?
Regards
Ray Drew
CIA UK
[Non-text portions of this message have been removed]
>>re Frank's comment:that's
>>
>> >btw. if you're using IB6, define the pk columns as NUMERIC(18,0) -
>> >because generators have grown from 32bit (=INTEGER) in IB5.6 to 64bit inFK's
>> >IB6 - unfortunately there is no INT64 sql type in IB6, but NUMERIC(18,0)
>> >*is* actually a 64bit int.
>>
>>Don't define the pk columns bigger than you need to. If they're used as
>>in other tables you'll be wasting a lot of space if you use 8 bytes when 2(numeric(18,0)). If >>you define the PK as integer, the generator value
>>or 4 will do.
>Error here, Ray. Generators under IB 6 Dialect 3 are 64-bit integer
won't fit into it.
I'm using Firebird 0.9 executable dated 29/12/00 on Windows NT. I'm using
Dialect 3.
The behaviour of this release is that you _can_ define columns as pk's using
a smallint or int data type and use generators to populate them. If the
generated value exceeds the data type's limit then an error will result. So,
if the genrator produces 32,768 for a column defined as smallint an error
will occur. If your pk is never going to reach the data type's limit, there
is no reason to use 8 bytes to store it, unless you want a bloated and slow
database.
Am I missing something?
Regards
Ray Drew
CIA UK
[Non-text portions of this message have been removed]