Subject Re: [firebird-support] binary or string?
Author Lester Caine
Storage Box wrote:

> Internally it is just incremented. It is the hex equivalent of the high +
> low values of a 32-bit integer. I create it and then increment one of the
> integers to guarantee each OID is unique until I run out of integers on both
> sides (high & low). It only takes about 20 lines of code to manage this
> process.

So why not just use a BIGINT ( 64 bit ), Or even better a pair of integers?
Why not one or two generators?

> I handle the prefix and other validation in my application's data-layer as I
> want to keep the app database-independent so really, a char(16) would work
> just fine I guess (it's always 16 characters).

If you need the 'text' version, a UDF to provide 'CAST INT TO HEX'
result in the SQL? But I would have thought a simple BIGINT would be enough?

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services