Skip to content

Commit 1ddfc89

Browse files
committed
Fix tests on 32 bit
The error was: uncaught exception: ResultError Incompatible {errSQLType = "int8", errSQLTableOid = Nothing, errSQLField = "count", errHaskellType = "Int", errMessage = "types incompatible"}
1 parent 0c89b20 commit 1ddfc89

File tree

1 file changed

+3
-2
lines changed
  • src/Database/PostgreSQL/Simple

1 file changed

+3
-2
lines changed

src/Database/PostgreSQL/Simple/Util.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ module Database.PostgreSQL.Simple.Util
2121
import Control.Exception (finally)
2222
import Database.PostgreSQL.Simple (Connection, Only (..), begin,
2323
query, rollback)
24+
import GHC.Int (Int64)
2425

2526
-- | Checks if the table with the given name exists in the database.
2627
existsTable :: Connection -> String -> IO Bool
2728
existsTable con table =
28-
fmap checkRowCount (query con q (Only table) :: IO [[Int]])
29+
fmap checkRowCount (query con q (Only table) :: IO [[Int64]])
2930
where
3031
q = "select count(relname) from pg_class where relname = ?"
3132

32-
checkRowCount :: [[Int]] -> Bool
33+
checkRowCount :: [[Int64]] -> Bool
3334
checkRowCount ((1:_):_) = True
3435
checkRowCount _ = False
3536

0 commit comments

Comments
 (0)