Chris Gahan wrote:
> I found some inconsistencies with the way PostgreSQL and MySQL handle
> integer attributes.
>
> I.e., you have this class:
>
> class SO(SQLObject):
> num = IntCol()
>
> If you were to make an instance of SO (call it so), and set the num
> attribute, MySQL would let you set it to a string or an int, while
> PostgreSQL only lets you set it to an int, and throws a confusing exception
> if you don't.
>
> It would be best if IntCol let the user put in ints, strings, or decimal-
> less floats (anything easily coercable to an int), and always spat out an
> int.
Yes, that would be good... well, maybe. Certainly the inconsistency is
less than positive.
To do this would be like BoolCol, which coerces its input.
Ian
|