Hi

pgdb module was casting my bigint types to longs, needlessly, since
I'm on a 64 bit architecture, so I replaced the line:
INTEGER = pgdbType('int2', 'int4', 'serial')

with the lines:
import sys
if sys.maxint == 9223372036854775807:
        INTEGER = pgdbType('int2', 'int4', 'serial', 'int8')
else:
        INTEGER = pgdbType('int2', 'int4', 'serial')

But really you don't even need to do this check, you can probably just
add int8 to that list:
INTEGER = pgdbType('int2', 'int4', 'serial', 'int8')

Or really, add all the non-float numeric types to the same
NUMBER/INTEGER type object, and rely on python's int() cast which will
return a long type for numbers that exceed the int range of the
architecture it's running on.
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to