@@ -111,7 +111,7 @@ import qualified Data.Vector as V
111111import Database.PostgreSQL.Simple.Internal
112112import Database.PostgreSQL.Simple.Compat
113113import Database.PostgreSQL.Simple.Ok
114−import Database.PostgreSQL.Simple.Types (Binary(..), Null(..))
114+import Database.PostgreSQL.Simple.Types
115115import Database.PostgreSQL.Simple.TypeInfo as TI
116116import qualified Database.PostgreSQL.Simple.TypeInfo.Static as TI
117117import Database.PostgreSQL.Simple.TypeInfo.Macro as TI
@@ -414,7 +414,7 @@ instance (FromField a, FromField b) => FromField (Either a b) where
414414 <|> (Left <$> fromField f dat)
415415
416416-- | any postgresql array whose elements are compatible with type @a@
417−instance (FromField a, Typeable a) => FromField (Vector a) where
417+instance (FromField a, Typeable a) => FromField (PGArray a) where
418418 fromField f mdat = do
419419 info <- typeInfo f
420420 case info of
@@ -424,7 +424,7 @@ instance (FromField a, Typeable a) => FromField (Vector a) where
424424 Just dat -> do
425425 case parseOnly (fromArray info f) dat of
426426 Left err -> returnError ConversionFailed f err
427− Right conv -> V.fromList <$> conv
427+ Right conv -> PGArray <$> conv
428428 _ -> returnError Incompatible f ""
429429
430430fromArray :: (FromField a)
@@ -437,6 +437,9 @@ fromArray typeInfo f = sequence . (parseIt <$>) <$> array delim
437437 where f' | Arrays.Array _ <- item = f
438438 | otherwise = fElem
439439
440+instance (FromField a, Typeable a) => FromField (Vector a) where
441+ fromField f v = V.fromList . fromPGArray <$> fromField f v
442+
440443-- | uuid
441444instance FromField UUID where
442445 fromField f mbs =