@@ -55,7 +55,7 @@ spec actualPgVersion = do
5555 totalCost `shouldBe`
5656 if actualPgVersion > pgVersion120
5757 then 24.28
58- else 32.28
58+ else 32.27
5959
6060 it " outputs blocks info when using the buffers option" $
6161 if actualPgVersion >= pgVersion130
@@ -126,8 +126,8 @@ spec actualPgVersion = do
126126 resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for=\" application/json\" ; options=verbose; charset=utf-8" )
127127 aggCol `shouldBe`
128128 if actualPgVersion >= pgVersion120
129- then Just [aesonQQ | "( COALESCE(json_agg(ROW(projects.id, projects.name, projects.client_id)), '[]'::json))::character varying " |]
130- else Just [aesonQQ | "( COALESCE(json_agg(ROW(pgrst_source.id, pgrst_source.name, pgrst_source.client_id)), '[]'::json))::character varying " |]
129+ then Just [aesonQQ | "COALESCE(json_agg(ROW(projects.id, projects.name, projects.client_id)), '[]'::json)" |]
130+ else Just [aesonQQ | "COALESCE(json_agg(ROW(pgrst_source.id, pgrst_source.name, pgrst_source.client_id)), '[]'::json)" |]
131131
132132 it " outputs the plan for application/vnd.pgrst.object " $ do
133133 r <- request methodGet " /projects_view" (acceptHdrs " application/vnd.pgrst.plan+json; for=\" application/vnd.pgrst.object\" ; options=verbose" ) " "
@@ -139,8 +139,8 @@ spec actualPgVersion = do
139139 resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for=\" application/vnd.pgrst.object+json\" ; options=verbose; charset=utf-8" )
140140 aggCol `shouldBe`
141141 if actualPgVersion >= pgVersion120
142- then Just [aesonQQ | "COALESCE((( json_agg(ROW(projects.id, projects.name, projects.client_id)) -> 0))::text , 'null'::text )" |]
143- else Just [aesonQQ | "COALESCE((( json_agg(ROW(pgrst_source.id, pgrst_source.name, pgrst_source.client_id)) -> 0))::text , 'null'::text )" |]
142+ then Just [aesonQQ | "COALESCE((json_agg(ROW(projects.id, projects.name, projects.client_id)) -> 0), 'null'::json )" |]
143+ else Just [aesonQQ | "COALESCE((json_agg(ROW(pgrst_source.id, pgrst_source.name, pgrst_source.client_id)) -> 0), 'null'::json )" |]
144144
145145 describe " writes plans" $ do
146146 it " outputs the total cost for an insert" $ do
@@ -205,7 +205,7 @@ spec actualPgVersion = do
205205
206206 liftIO $ do
207207 resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for=\" application/vnd.pgrst.object+json\" ; options=verbose; charset=utf-8" )
208- aggCol `shouldBe` Just [aesonQQ | "COALESCE((( json_agg(ROW(projects.id, projects.name, projects.client_id)) -> 0))::text , 'null'::text )" |]
208+ aggCol `shouldBe` Just [aesonQQ | "COALESCE((json_agg(ROW(projects.id, projects.name, projects.client_id)) -> 0), 'null'::json )" |]
209209
210210 describe " function plan" $ do
211211 it " outputs the total cost for a function call" $ do
@@ -219,7 +219,7 @@ spec actualPgVersion = do
219219 liftIO $ do
220220 resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
221221 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
222- totalCost `shouldBe` 68.57
222+ totalCost `shouldBe` 68.56
223223
224224 it " outputs the plan for text/xml" $ do
225225 r <- request methodGet " /rpc/return_scalar_xml"
0 commit comments