chore(deps): update hackage freeze, stackage snapshot and nixpkgs pin

This brings in PostgreSQL 19 beta 1 to start testing against.
This commit is contained in:
Wolfgang Walther
2026-07-05 12:50:14 +00:00
parent 936d9df13d
commit 0bd2821937
12 changed files with 58 additions and 38 deletions
+1 -5
View File
@@ -2056,11 +2056,7 @@ def test_db_pre_config_with_pg_reserved_words(defaultenv):
with run(env=env, no_startup_stdout=False, wait_for=None) as postgrest:
output = postgrest.read_stdout(nlines=8)
assert any(
'Failed to query database settings for the config parameters.{"code":"42883","details":null,"hint":"No function matches the given name and argument types. You might need to add explicit type casts.","message":"function select() does not exist"}'
in line
for line in output
)
assert any("function select() does not exist" in line for line in output)
def test_server_timing_transaction_duration_with_role_statement_timeout(
@@ -365,7 +365,7 @@ spec withConfig = withConfig baseCfg $
context "tables with self reference foreign keys" $ do
context "one self reference foreign key" $ do
it "embeds parents recursively" $
get "/family_tree?id=in.(3,4)&select=id,parent(id,name,parent(*))" `shouldRespondWith`
get "/family_tree?id=in.(3,4)&select=id,parent(id,name,parent(*))&order=id" `shouldRespondWith`
[json|[
{ "id": "3", "parent": { "id": "1", "name": "Parental Unit", "parent": null } },
{ "id": "4", "parent": { "id": "2", "name": "Kid One", "parent": { "id": "1", "name": "Parental Unit", "parent": null } } }
@@ -390,7 +390,7 @@ spec withConfig = withConfig baseCfg $
}]|] { matchHeaders = [matchContentTypeJson] }
it "embeds parent and then embeds children on a view" $
get "/job?select=id,parent_id(*),children:job!parent_id(id,parent_id)" `shouldRespondWith`
get "/job?select=id,parent_id(*),children:job!parent_id(id,parent_id)&order=id" `shouldRespondWith`
[json|[
{
"id": 1,
@@ -527,13 +527,13 @@ spec withConfig = withConfig baseCfg $
context "embedding with col as a target doesn't consider views" $ do
-- https://github.com/PostgREST/postgrest/issues/1643
it "works with self reference both ways(m2o and o2m)" $ do
get "/test?select=id,parent_id,parent:parent_id(id)" `shouldRespondWith`
get "/test?select=id,parent_id,parent:parent_id(id)&order=id" `shouldRespondWith`
[json| [
{ "id": 1, "parent_id": null, "parent": null },
{ "id": 2, "parent_id": 1, "parent": { "id": 1 } }
] |]
{ matchHeaders = [matchContentTypeJson] }
get "/test?select=id,parent_id,childs:test(id)" `shouldRespondWith`
get "/test?select=id,parent_id,childs:test(id)&order=id" `shouldRespondWith`
[json| [
{ "id": 1, "parent_id": null, "childs": [ { "id": 2 } ] },
{ "id": 2, "parent_id": 1, "childs": [] }
+22 -8
View File
@@ -5,11 +5,13 @@ import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import PostgREST.Config.PgVersion (PgVersion, pgVersion190)
import Protolude hiding (get)
import SpecHelper
spec :: SpecWithConfig
spec withConfig = withConfig baseCfg $ describe "json and jsonb operators" $ do
spec :: PgVersion -> SpecWithConfig
spec actualPgVersion withConfig = withConfig baseCfg $ describe "json and jsonb operators" $ do
context "Shaping response with select parameter" $ do
it "obtains a json subfield one level with casting" $
get "/complex_items?id=eq.1&select=settings->>foo::json" `shouldRespondWith`
@@ -67,15 +69,27 @@ spec withConfig = withConfig baseCfg $ describe "json and jsonb operators" $ do
it "fails when a double arrow ->> is followed with a single arrow ->" $ do
get "/json_arr?select=data->>c->1"
`shouldRespondWith`
[json|
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
"details":null,"code":"42883","message":"operator does not exist: text -> integer"} |]
(if actualPgVersion < pgVersion190 then
[json|
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
"details":null,"code":"42883","message":"operator does not exist: text -> integer"} |]
else
[json|
{"hint":"You might need to add explicit type casts.","details":"No operator of that name accepts the given argument types.",
"code":"42883","message":"operator does not exist: text -> integer"} |]
)
{ matchStatus = 404 , matchHeaders = [] }
get "/json_arr?select=data->>c->b"
`shouldRespondWith`
[json|
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
"details":null,"code":"42883","message":"operator does not exist: text -> unknown"} |]
(if actualPgVersion < pgVersion190 then
[json|
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
"details":null,"code":"42883","message":"operator does not exist: text -> unknown"} |]
else
[json|
{"hint":"You might need to add explicit type casts.","details":"No operator of that name accepts the given argument types.",
"code":"42883","message":"operator does not exist: text -> unknown"} |]
)
{ matchStatus = 404 , matchHeaders = [] }
context "with array index" $ do
+14 -9
View File
@@ -7,11 +7,13 @@ import Test.Hspec hiding (pendingWith)
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import PostgREST.Config.PgVersion (PgVersion, pgVersion190)
import Protolude hiding (get)
import SpecHelper
spec :: SpecWithConfig
spec withConfig = withConfig baseCfg $ do
spec :: PgVersion -> SpecWithConfig
spec actualPgVersion withConfig = withConfig baseCfg $ do
describe "Querying a table with a column called count" $
it "should not confuse count column with pg_catalog.count aggregate" $
@@ -1651,14 +1653,17 @@ spec withConfig = withConfig baseCfg $ do
-- verifies we don't panic or add inappropriate SQL to the filters.
it "fails safely on user trying to use ilike operator on data reps column" $
get "/datarep_todos?select=id,name&label_color=ilike.#*100" `shouldRespondWith`
[json|
{"code":"42883","details":null,"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.","message":"operator does not exist: public.color ~~* unknown"}
|]
(if actualPgVersion < pgVersion190 then
[json|
{"code":"42883","details":null,"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.","message":"operator does not exist: public.color ~~* unknown"}
|]
else
[json|
{"code":"42883","details":"No operator of that name accepts the given argument types.","hint":"You might need to add explicit type casts.","message":"operator does not exist: public.color ~~* unknown"}
|]
)
{ matchStatus = 404
, matchHeaders = [
"Content-Length" <:> "200",
matchContentTypeJson
]
, matchHeaders = [ matchContentTypeJson ]
}
context "searching for an empty string" $ do
+2 -2
View File
@@ -140,7 +140,7 @@ main = do
, ("Feature.Query.EmbedInnerJoinSpec" , Feature.Query.EmbedInnerJoinSpec.spec)
, ("Feature.Query.ErrorSpec" , Feature.Query.ErrorSpec.spec)
, ("Feature.Query.InsertSpec" , Feature.Query.InsertSpec.spec)
, ("Feature.Query.JsonOperatorSpec" , Feature.Query.JsonOperatorSpec.spec)
, ("Feature.Query.JsonOperatorSpec" , Feature.Query.JsonOperatorSpec.spec actualPgVersion)
, ("Feature.Query.NullsStripSpec" , Feature.Query.NullsStripSpec.spec)
, ("Feature.Query.PgSafeUpdateSpec.disabledSpec" , Feature.Query.PgSafeUpdateSpec.disabledSpec)
, ("Feature.Query.PlanSpec.disabledSpec" , Feature.Query.PlanSpec.disabledSpec)
@@ -149,7 +149,7 @@ main = do
, ("Feature.Query.Preferences.MaxAffectedSpec" , Feature.Query.Preferences.MaxAffectedSpec.spec)
, ("Feature.Query.Preferences.TimezoneSpec.enabledSpec", Feature.Query.Preferences.TimezoneSpec.enabledSpec)
, ("Feature.Query.QueryLimitedSpec" , Feature.Query.QueryLimitedSpec.spec)
, ("Feature.Query.QuerySpec" , Feature.Query.QuerySpec.spec)
, ("Feature.Query.QuerySpec" , Feature.Query.QuerySpec.spec actualPgVersion)
, ("Feature.Query.RangeSpec" , Feature.Query.RangeSpec.spec)
, ("Feature.Query.RawOutputTypesSpec" , Feature.Query.RawOutputTypesSpec.spec)
, ("Feature.Query.RelatedQueriesSpec" , Feature.Query.RelatedQueriesSpec.spec)