You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fails to round-trip for naturals bigger than a Word64.
I would argue that this instance should be removed.
If you don't need naturals that big, then just use the Word64 instance instead.
If you do, then you expect them to roundtrip.
The text was updated successfully, but these errors were encountered:
Good catch, thanks! Removing the instance seems right, given that we don't provide an instance for Integer and there doesn't appear to be a truly unbounded number type. MySQL supports 65 digits in numeric, and Postgres supports 1000 digits, which are both huge but not infinite.
sqlType _ =SqlNumeric3220-- need to make this field big enough to handle Rational to Mumber string conversion for ODBC
but there are lots of rational numbers which can't be represented exactly this way. In particular, anything with more than 20 decimal places, anything with more than 32 significant figures, and also any fraction with a denominator which has prime factors other than 2 or 5 (such as 1/3).
persistent/persistent/Database/Persist/Sql/Class.hs
Lines 493 to 494 in 6665283
This fails to round-trip for naturals bigger than a Word64.
I would argue that this instance should be removed.
If you don't need naturals that big, then just use the Word64 instance instead.
If you do, then you expect them to roundtrip.
The text was updated successfully, but these errors were encountered: