HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulepostgresql-simple-0.7.0.1Haskell2010

Database.PostgreSQL.Simple.Range

  • 2 types
  • 6 values
datadata PGRange a
#

Generic range type

Constructors

Instances28Functor, Eq, Show, FromField, ToField, …
valueisEmpty :: Ord a => PGRange a -> Bool
#

Is a range empty? If this returns True, then the contains predicate will always return False. However, if this returns False, it is not necessarily true that there exists a point for which contains returns True. Consider PGRange (Excludes 2) (Excludes 3) :: PGRange Int, for example.

valuecontains :: Ord a => PGRange a -> a -> Bool
#

Does a range contain a given point? Note that in some cases, this may not correspond exactly with a server-side computation. Consider UTCTime for example, which has a resolution of a picosecond, whereas postgresql's timestamptz types have a resolution of a microsecond. Putting such Haskell values into the database will result in them being rounded, which can change the value of the containment predicate.