@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12
23------------------------------------------------------------------------------
34-- |
@@ -41,8 +42,12 @@ finishQueryWith parser conn q result = do
4142 PQ.CommandOk -> queryErr "query resulted in a command response"
4243 PQ.CopyOut -> queryErr "query: COPY TO is not supported"
4344 PQ.CopyIn -> queryErr "query: COPY FROM is not supported"
45+#if MIN_VERSION_postgresql_libpq(0,9,3)
4446 PQ.CopyBoth -> queryErr "query: COPY BOTH is not supported"
47+#endif
48+#if MIN_VERSION_postgresql_libpq(0,9,2)
4549 PQ.SingleTuple -> queryErr "query: single-row mode is not supported"
50+#endif
4651 PQ.BadResponse -> throwResultError "query" result status
4752 PQ.NonfatalError -> throwResultError "query" result status
4853 PQ.FatalError -> throwResultError "query" result status
@@ -67,8 +72,7 @@ getRowWith parser row ncols conn result = do
6772 Nothing
6873 ""
6974 (show (unCol col) ++ " slots in target type")
70− "mismatch between number of columns to \
71− \convert and number in target type")
75+ "mismatch between number of columns to convert and number in target type")
7276 Errors [] -> throwIO $ ConversionFailed "" Nothing "" "" "unknown error"
7377 Errors [x] -> throwIO x
7478 Errors xs -> throwIO $ ManyErrors xs