git.iko.soy/typeable/postgresql-simple
on master help sign in
Issue SET datestyle TO ISO at connection start up
68023a1Leon P Smith
src/Database/PostgreSQL/Simple/Internal.hs+2−1
@@ -153,7 +153,8 @@ 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− _ <- execute_ wconn "SET standard_conforming_strings TO on"
156+ _ <- execute_ wconn "SET standard_conforming_strings TO on;\
157+ \SET datestyle TO ISO"
157 return Connection{..}
158 return Connection{..}
158 _ -> do
159 _ -> do
159 msg <- maybe "connectPostgreSQL error" id <$> PQ.errorMessage conn
160 msg <- maybe "connectPostgreSQL error" id <$> PQ.errorMessage conn