git.iko.soy/typeable/postgresql-simple
on master help sign in
Don't store floating point NaNs and Infinites as NULL
226efffLeon P Smith
src/Database/PostgreSQL/Simple/Param.hs+2−2
@@ -157,12 +157,12 @@ instance Param PQ.Oid where
157 {-# INLINE render #-}
157 {-# INLINE render #-}
158
158
159instance Param Float where
159instance Param Float where
160− render v | isNaN v || isInfinite v = renderNull
160+ render v | isNaN v || isInfinite v = Plain (inQuotes (float v))
161 | otherwise = Plain (float v)
161 | otherwise = Plain (float v)
162 {-# INLINE render #-}
162 {-# INLINE render #-}
163
163
164instance Param Double where
164instance Param Double where
165− render v | isNaN v || isInfinite v = renderNull
165+ render v | isNaN v || isInfinite v = Plain (inQuotes (double v))
166 | otherwise = Plain (double v)
166 | otherwise = Plain (double v)
167 {-# INLINE render #-}
167 {-# INLINE render #-}
168
168