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
Low-level mapping between basic Haskell types and PostgreSQL types is handled by the postgresql-simple library. Since Scientific is such a foundational type, I am weary of messing with it in beam
A Postgresql NUMERIC value can be NaN, but a Haskell Scientific value cannot.
However,
numeric
links NUMERIC to Scientific. What can I do if I want to use NUMERIC columns with NaN values?The next best thing I can do is to make the column nullable, but I would rather simply use NaN since Postgresql allows it.
decimal
does what I want except that I am trying to use decimal fixed-point numbers, which Scientific affords, not binary floating-point numbers.If instead of:
there is:
Then NaN could be represented as
Nothing
and my immediate problem would be fixed, though +/-Inf would still be problematic.The text was updated successfully, but these errors were encountered: