This fixes a bug where from_sql was converting Numeric::NaN to 0 rather than returning an error.
It also returns a more descriptive error message when from_sql is called with Numeric Infinity and -Infinity, which are also not representable in Decimal.
Closes #655
Side note: Unless I am missing something, it seems like the to_from_sql test wasn't actually being run since the postgres feature seems to no longer be a thing. I was able to get it to run by changing the cfg to db-postgres, so I added that to this commit as well.
This fixes a bug where from_sql was converting Numeric::NaN to 0 rather than returning an error.
It also returns a more descriptive error message when from_sql is called with Numeric Infinity and -Infinity, which are also not representable in Decimal.
Closes #655
Side note: Unless I am missing something, it seems like the to_from_sql test wasn't actually being run since the
postgres
feature seems to no longer be a thing. I was able to get it to run by changing the cfg todb-postgres
, so I added that to this commit as well.