@@ -276,6 +276,7 @@ instance ToParam UTCTime 'PGtimestamptz where
276276instance ToParam DiffTime 'PGinterval where toParam = K . Encoding.interval_int
277277instance ToParam Value 'PGjson where toParam = K . Encoding.json_ast
278278instance ToParam Value 'PGjsonb where toParam = K . Encoding.jsonb_ast
279+instance ToParam Jsonb 'PGjsonb where toParam = toParam . getJsonb
279280instance ToArray x ('NotNull ('PGvararray ty))
280281 => ToParam x ('PGvararray ty) where
281282 toParam
@@ -286,6 +287,8 @@ instance ToArray x ('NotNull ('PGfixarray n ty))
286287 toParam
287288 = K . Encoding.array (baseOid @x @('NotNull ('PGfixarray n ty)))
288289 . unK . toArray @x @('NotNull ('PGfixarray n ty))
290+instance ToParam x pg => ToParam (Enumerated x) pg where
291+ toParam = toParam . getEnumerated
289292instance
290293 ( IsEnumType x
291294 , HasDatatypeInfo x
@@ -304,6 +307,8 @@ instance
304307 . Strict.pack
305308 . gshowConstructor (constructorInfo (datatypeInfo (Proxy @x)))
306309 . from
310+instance ToParam x pg => ToParam (Composite x) pg where
311+ toParam = toParam . getComposite
307312instance
308313 ( SListI fields
309314 , IsRecord x xs
@@ -448,12 +453,16 @@ instance FromValue 'PGinterval DiffTime where
448453 fromValue = Decoding.interval_int
449454instance FromValue 'PGjson Value where fromValue = Decoding.json_ast
450455instance FromValue 'PGjsonb Value where fromValue = Decoding.jsonb_ast
456+instance FromValue 'PGjsonb Jsonb where
457+ fromValue = Jsonb <$> fromValue @'PGjsonb
451458instance FromArray ('NotNull ('PGvararray ty)) y
452459 => FromValue ('PGvararray ty) y where
453460 fromValue = Decoding.array (fromArray @('NotNull ('PGvararray ty)) @y)
454461instance FromArray ('NotNull ('PGfixarray n ty)) y
455462 => FromValue ('PGfixarray n ty) y where
456463 fromValue = Decoding.array (fromArray @('NotNull ('PGfixarray n ty)) @y)
464+instance FromValue pg y => FromValue pg (Enumerated y) where
465+ fromValue = Enumerated <$> fromValue @pg
457466instance
458467 ( IsEnumType y
459468 , HasDatatypeInfo y
@@ -476,7 +485,8 @@ instance
476485 $ fmap to
477486 . greadConstructor (constructorInfo (datatypeInfo (Proxy @y)))
478487 . Strict.unpack
479−
488+instance FromValue pg y => FromValue pg (Composite y) where
489+ fromValue = Composite <$> fromValue @pg
480490instance
481491 ( FromRow fields y
482492 ) => FromValue ('PGcomposite fields) y where