@@ -235,9 +235,13 @@ instance ToParam DiffTime 'PGinterval where toParam = K . Encoding.interval_int
235235instance ToParam Value 'PGjson where toParam = K . Encoding.json_ast
236236instance ToParam Value 'PGjsonb where toParam = K . Encoding.jsonb_ast
237237instance (HasOid pg, ToParam x pg)
238− => ToParam (Vector (Maybe x)) ('PGvararray pg) where
238+ => ToParam (Vector (Maybe x)) ('PGvararray ('Null pg)) where
239239 toParam = K . Encoding.nullableArray_vector
240240 (oid @pg) (unK . toParam @x @pg)
241+instance (HasOid pg, ToParam x pg)
242+ => ToParam (Vector x) ('PGvararray ('NotNull pg)) where
243+ toParam = K . Encoding.array_vector
244+ (oid @pg) (unK . toParam @x @pg)
241245instance
242246 ( IsEnumType x
243247 , HasDatatypeInfo x
@@ -386,14 +390,26 @@ instance FromValue 'PGinterval DiffTime where
386390 fromValue _ = Decoding.interval_int
387391instance FromValue 'PGjson Value where fromValue _ = Decoding.json_ast
388392instance FromValue 'PGjsonb Value where fromValue _ = Decoding.jsonb_ast
389−instance FromValue pg y => FromValue ('PGvararray pg) (Vector (Maybe y)) where
390− fromValue _ = Decoding.array
391− (Decoding.dimensionArray Vector.replicateM
392− (Decoding.nullableValueArray (fromValue (Proxy @pg))))
393−instance FromValue pg y => FromValue ('PGfixarray n pg) (Vector (Maybe y)) where
394− fromValue _ = Decoding.array
395− (Decoding.dimensionArray Vector.replicateM
396− (Decoding.nullableValueArray (fromValue (Proxy @pg))))
393+instance FromValue pg y
394+ => FromValue ('PGvararray ('Null pg)) (Vector (Maybe y)) where
395+ fromValue _ = Decoding.array
396+ (Decoding.dimensionArray Vector.replicateM
397+ (Decoding.nullableValueArray (fromValue (Proxy @pg))))
398+instance FromValue pg y
399+ => FromValue ('PGvararray ('NotNull pg)) (Vector y) where
400+ fromValue _ = Decoding.array
401+ (Decoding.dimensionArray Vector.replicateM
402+ (Decoding.valueArray (fromValue (Proxy @pg))))
403+instance FromValue pg y
404+ => FromValue ('PGfixarray n ('Null pg)) (Vector (Maybe y)) where
405+ fromValue _ = Decoding.array
406+ (Decoding.dimensionArray Vector.replicateM
407+ (Decoding.nullableValueArray (fromValue (Proxy @pg))))
408+instance FromValue pg y
409+ => FromValue ('PGfixarray n ('NotNull pg)) (Vector y) where
410+ fromValue _ = Decoding.array
411+ (Decoding.dimensionArray Vector.replicateM
412+ (Decoding.valueArray (fromValue (Proxy @pg))))
397413instance
398414 ( IsEnumType y
399415 , HasDatatypeInfo y