@@ -84,9 +84,9 @@ getCopyData conn = withConnection conn loop
8484 result <- maybe (fail errCmdStatus) return =<< PQ.getResult pqconn
8585 cmdStat <- maybe (fail errCmdStatus) return =<< PQ.cmdStatus result
8686 let rowCount = P.string "COPY " *> P.decimal
87− case P.parseOnly rowCount cmdStat of
87+ case P.parseOnly (rowCount <* P.endOfInput) cmdStat of
8888 Left _ -> fail errCmdStatusFmt
89− Right n -> return (CopyOutDone n)
89+ Right n -> return $! CopyOutDone n
9090#if defined(mingw32_HOST_OS)
9191 PQ.CopyOutWouldBlock -> do
9292 fail (B.unpack funcName ++ ": the impossible happened")