The Result typeclass, for converting a single value in a row
returned by a SQL query into a more useful Haskell representation.

A Haskell numeric type is considered to be compatible with all
PostgreSQL numeric types that are less accurate than it. For instance,
the Haskell Double type is compatible with the PostgreSQL's 32-bit
Int type because it can represent a Int exactly. On the other hand,
since a Double might lose precision if representing a 64-bit BigInt,
the two are not considered compatible.

Documentation

Returns a list of exceptions if the conversion fails. In the case of
library instances, this will usually be a single ResultError, but
may be a UnicodeException.

Implementations of fromField should not retain any references to
the Field nor the ByteString arguments after the result has
been evaluated to WHNF. Such a reference causes the entire
LibPQ.Result to be retained.

For example, the instance for ByteString uses copy to avoid
such a reference, and that using bytestring functions such as drop
and takeWhile alone will also trigger this memory leak.