You can save the value in type NUMERIC with a scale of 0, which preserves the semantics of integer . The NUMERIC type will give negative numbers, although you can set a constraint that requires positive integers.
The maximum precision for NUMERIC is 38 decimal digits. 2**64 is somewhere around 18 or 19 decimal digits, so NUMERIC(19,0) is likely to work fine for this data.
Ken gentle
source share