@@ -111,6 +111,7 @@ data Range x = Empty | NonEmpty (Bound x) (Bound x)
111 , Functor, Foldable, Traversable )
111 , Functor, Foldable, Traversable )
112 deriving anyclass (SOP.Generic, SOP.HasDatatypeInfo)
112 deriving anyclass (SOP.Generic, SOP.HasDatatypeInfo)
113type instance PG (Range x) = 'PGrange (PG x)
113type instance PG (Range x) = 'PGrange (PG x)
114+-- https://github.com/postgres/postgres/blob/8255c7a5eeba8f1a38b7a431c04909bde4f5e67d/src/backend/utils/adt/rangetypes.c
114instance ToParam x pg => ToParam (Range x) ('PGrange pg) where
115instance ToParam x pg => ToParam (Range x) ('PGrange pg) where
115 toParam = \case
116 toParam = \case
116 Empty -> K (bytes "\'empty\'")
117 Empty -> K (bytes "\'empty\'")