@@ -80,12 +80,15 @@ import Squeal.PostgreSQL.Schema
8080-- tstzrange(now(), NULL, '[)')
8181-- >>> printSQL $ range numrange (0 <=..< 2*pi)
8282-- numrange(0, (2 * pi()), '[)')
83+-- >>> printSQL $ range int4range Empty
84+-- (empty :: int4range)
8385range
8486 :: TypeExpression schemas (null ('PGrange ty))
8587 -> Range (Expression outer commons grp schemas params from ('NotNull ty))
8688 -> Expression outer commons grp schemas params from (null ('PGrange ty))
8789range ty = \case
88− Empty -> UnsafeExpression "empty"
90+ Empty -> UnsafeExpression $ parenthesized
91+ ("empty" <+> "::" <+> renderSQL ty)
8992 NonEmpty l u -> UnsafeExpression $ renderSQL ty <> parenthesized
9093 (commaSeparated [renderArg l, renderArg u, renderClopen l u])
9194 where