@@ -153,9 +153,13 @@ connectPostgreSQL connstr = do
153 connectionHandle <- newMVar conn
153 connectionHandle <- newMVar conn
154 connectionObjects <- newMVar (IntMap.empty)
154 connectionObjects <- newMVar (IntMap.empty)
155 let wconn = Connection{..}
155 let wconn = Connection{..}
156+ version <- PQ.serverVersion conn
158+ | version < 80200 = "SET datestyle TO ISO"
156− _ <- execute_ wconn "SET standard_conforming_strings TO on;\
159+ | otherwise = "SET standard_conforming_strings TO on;\
157− \SET datestyle TO ISO"
160+ \SET datestyle TO ISO"
161+ _ <- execute_ wconn settings
158− return Connection{..}
162+ return wconn
160 msg <- maybe "connectPostgreSQL error" id <$> PQ.errorMessage conn
164 msg <- maybe "connectPostgreSQL error" id <$> PQ.errorMessage conn
161 throwIO $ SqlError { sqlNativeError = -1 -- FIXME?
165 throwIO $ SqlError { sqlNativeError = -1 -- FIXME?