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:
@@ -75,7 +75,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Latest version is tested via `coverage` above.
|
# Latest version is tested via `coverage` above.
|
||||||
pgVersion: [14, 15, 16, 17]
|
pgVersion: [14, 15, 16, 17, 18]
|
||||||
name: PG ${{ matrix.pgVersion }}
|
name: PG ${{ matrix.pgVersion }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
defaults:
|
defaults:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
index-state: hackage.haskell.org 2026-06-02T04:24:44Z
|
index-state: hackage.haskell.org 2026-07-01T00:00:00Z
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ let
|
|||||||
|
|
||||||
postgresqlVersions =
|
postgresqlVersions =
|
||||||
[
|
[
|
||||||
|
{ name = "pg-19"; postgresql = pkgs.postgresql_19.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||||
{ name = "pg-18"; postgresql = pkgs.postgresql_18.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
{ name = "pg-18"; postgresql = pkgs.postgresql_18.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||||
{ name = "pg-17"; postgresql = pkgs.postgresql_17.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
{ name = "pg-17"; postgresql = pkgs.postgresql_17.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||||
{ name = "pg-16"; postgresql = pkgs.postgresql_16.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
{ name = "pg-16"; postgresql = pkgs.postgresql_16.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||||
|
|||||||
Generated
+3
-3
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780336545,
|
"lastModified": 1782918843,
|
||||||
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
|
"narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
|
"rev": "e8273b29fe1390ec8d4603f2477357555291432e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ module PostgREST.Config.PgVersion
|
|||||||
, minimumPgVersion
|
, minimumPgVersion
|
||||||
, pgVersion150
|
, pgVersion150
|
||||||
, pgVersion180
|
, pgVersion180
|
||||||
|
, pgVersion190
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Data.Aeson as JSON
|
import qualified Data.Aeson as JSON
|
||||||
@@ -34,3 +35,6 @@ pgVersion150 = PgVersion 150000 "15.0" "15.0"
|
|||||||
|
|
||||||
pgVersion180 :: PgVersion
|
pgVersion180 :: PgVersion
|
||||||
pgVersion180 = PgVersion 180000 "18.0" "18.0"
|
pgVersion180 = PgVersion 180000 "18.0" "18.0"
|
||||||
|
|
||||||
|
pgVersion190 :: PgVersion
|
||||||
|
pgVersion190 = PgVersion 190000 "19.0" "19.0"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# When updating, update GHC version in .github/workflows/build.yaml as well.
|
# When updating, update GHC version in .github/workflows/build.yaml as well.
|
||||||
resolver: lts-24.43 # 2026-05-29, GHC 9.10.3
|
resolver: lts-24.48 # 2026-06-30, GHC 9.10.3
|
||||||
|
|
||||||
nix:
|
nix:
|
||||||
packages:
|
packages:
|
||||||
|
|||||||
+4
-4
@@ -55,7 +55,7 @@ packages:
|
|||||||
hackage: warp-3.4.13
|
hackage: warp-3.4.13
|
||||||
snapshots:
|
snapshots:
|
||||||
- completed:
|
- completed:
|
||||||
sha256: 3c412a7c13dba6d3d808455a458e0776c58b6cf99b8a7961a2f5e55589d6f1d6
|
sha256: 3286bb954fe0e7e0291ca61fac01a689b7165da9d7e8ba3c3a045be989c860fd
|
||||||
size: 729011
|
size: 732677
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/43.yaml
|
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/48.yaml
|
||||||
original: lts-24.43
|
original: lts-24.48
|
||||||
|
|||||||
+1
-5
@@ -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:
|
with run(env=env, no_startup_stdout=False, wait_for=None) as postgrest:
|
||||||
output = postgrest.read_stdout(nlines=8)
|
output = postgrest.read_stdout(nlines=8)
|
||||||
assert any(
|
assert any("function select() does not exist" in line for line in output)
|
||||||
'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
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_server_timing_transaction_duration_with_role_statement_timeout(
|
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 "tables with self reference foreign keys" $ do
|
||||||
context "one self reference foreign key" $ do
|
context "one self reference foreign key" $ do
|
||||||
it "embeds parents recursively" $
|
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|[
|
[json|[
|
||||||
{ "id": "3", "parent": { "id": "1", "name": "Parental Unit", "parent": null } },
|
{ "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 } } }
|
{ "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] }
|
}]|] { matchHeaders = [matchContentTypeJson] }
|
||||||
|
|
||||||
it "embeds parent and then embeds children on a view" $
|
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|[
|
[json|[
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
@@ -527,13 +527,13 @@ spec withConfig = withConfig baseCfg $
|
|||||||
context "embedding with col as a target doesn't consider views" $ do
|
context "embedding with col as a target doesn't consider views" $ do
|
||||||
-- https://github.com/PostgREST/postgrest/issues/1643
|
-- https://github.com/PostgREST/postgrest/issues/1643
|
||||||
it "works with self reference both ways(m2o and o2m)" $ do
|
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| [
|
[json| [
|
||||||
{ "id": 1, "parent_id": null, "parent": null },
|
{ "id": 1, "parent_id": null, "parent": null },
|
||||||
{ "id": 2, "parent_id": 1, "parent": { "id": 1 } }
|
{ "id": 2, "parent_id": 1, "parent": { "id": 1 } }
|
||||||
] |]
|
] |]
|
||||||
{ matchHeaders = [matchContentTypeJson] }
|
{ 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| [
|
[json| [
|
||||||
{ "id": 1, "parent_id": null, "childs": [ { "id": 2 } ] },
|
{ "id": 1, "parent_id": null, "childs": [ { "id": 2 } ] },
|
||||||
{ "id": 2, "parent_id": 1, "childs": [] }
|
{ "id": 2, "parent_id": 1, "childs": [] }
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import Test.Hspec
|
|||||||
import Test.Hspec.Wai
|
import Test.Hspec.Wai
|
||||||
import Test.Hspec.Wai.JSON
|
import Test.Hspec.Wai.JSON
|
||||||
|
|
||||||
|
import PostgREST.Config.PgVersion (PgVersion, pgVersion190)
|
||||||
|
|
||||||
import Protolude hiding (get)
|
import Protolude hiding (get)
|
||||||
import SpecHelper
|
import SpecHelper
|
||||||
|
|
||||||
spec :: SpecWithConfig
|
spec :: PgVersion -> SpecWithConfig
|
||||||
spec withConfig = withConfig baseCfg $ describe "json and jsonb operators" $ do
|
spec actualPgVersion withConfig = withConfig baseCfg $ describe "json and jsonb operators" $ do
|
||||||
context "Shaping response with select parameter" $ do
|
context "Shaping response with select parameter" $ do
|
||||||
it "obtains a json subfield one level with casting" $
|
it "obtains a json subfield one level with casting" $
|
||||||
get "/complex_items?id=eq.1&select=settings->>foo::json" `shouldRespondWith`
|
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
|
it "fails when a double arrow ->> is followed with a single arrow ->" $ do
|
||||||
get "/json_arr?select=data->>c->1"
|
get "/json_arr?select=data->>c->1"
|
||||||
`shouldRespondWith`
|
`shouldRespondWith`
|
||||||
[json|
|
(if actualPgVersion < pgVersion190 then
|
||||||
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
|
[json|
|
||||||
"details":null,"code":"42883","message":"operator does not exist: text -> integer"} |]
|
{"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 = [] }
|
{ matchStatus = 404 , matchHeaders = [] }
|
||||||
get "/json_arr?select=data->>c->b"
|
get "/json_arr?select=data->>c->b"
|
||||||
`shouldRespondWith`
|
`shouldRespondWith`
|
||||||
[json|
|
(if actualPgVersion < pgVersion190 then
|
||||||
{"hint":"No operator matches the given name and argument types. You might need to add explicit type casts.",
|
[json|
|
||||||
"details":null,"code":"42883","message":"operator does not exist: text -> unknown"} |]
|
{"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 = [] }
|
{ matchStatus = 404 , matchHeaders = [] }
|
||||||
|
|
||||||
context "with array index" $ do
|
context "with array index" $ do
|
||||||
|
|||||||
@@ -7,11 +7,13 @@ import Test.Hspec hiding (pendingWith)
|
|||||||
import Test.Hspec.Wai
|
import Test.Hspec.Wai
|
||||||
import Test.Hspec.Wai.JSON
|
import Test.Hspec.Wai.JSON
|
||||||
|
|
||||||
|
import PostgREST.Config.PgVersion (PgVersion, pgVersion190)
|
||||||
|
|
||||||
import Protolude hiding (get)
|
import Protolude hiding (get)
|
||||||
import SpecHelper
|
import SpecHelper
|
||||||
|
|
||||||
spec :: SpecWithConfig
|
spec :: PgVersion -> SpecWithConfig
|
||||||
spec withConfig = withConfig baseCfg $ do
|
spec actualPgVersion withConfig = withConfig baseCfg $ do
|
||||||
|
|
||||||
describe "Querying a table with a column called count" $
|
describe "Querying a table with a column called count" $
|
||||||
it "should not confuse count column with pg_catalog.count aggregate" $
|
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.
|
-- 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" $
|
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`
|
get "/datarep_todos?select=id,name&label_color=ilike.#*100" `shouldRespondWith`
|
||||||
[json|
|
(if actualPgVersion < pgVersion190 then
|
||||||
{"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"}
|
[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
|
{ matchStatus = 404
|
||||||
, matchHeaders = [
|
, matchHeaders = [ matchContentTypeJson ]
|
||||||
"Content-Length" <:> "200",
|
|
||||||
matchContentTypeJson
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context "searching for an empty string" $ do
|
context "searching for an empty string" $ do
|
||||||
|
|||||||
+2
-2
@@ -140,7 +140,7 @@ main = do
|
|||||||
, ("Feature.Query.EmbedInnerJoinSpec" , Feature.Query.EmbedInnerJoinSpec.spec)
|
, ("Feature.Query.EmbedInnerJoinSpec" , Feature.Query.EmbedInnerJoinSpec.spec)
|
||||||
, ("Feature.Query.ErrorSpec" , Feature.Query.ErrorSpec.spec)
|
, ("Feature.Query.ErrorSpec" , Feature.Query.ErrorSpec.spec)
|
||||||
, ("Feature.Query.InsertSpec" , Feature.Query.InsertSpec.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.NullsStripSpec" , Feature.Query.NullsStripSpec.spec)
|
||||||
, ("Feature.Query.PgSafeUpdateSpec.disabledSpec" , Feature.Query.PgSafeUpdateSpec.disabledSpec)
|
, ("Feature.Query.PgSafeUpdateSpec.disabledSpec" , Feature.Query.PgSafeUpdateSpec.disabledSpec)
|
||||||
, ("Feature.Query.PlanSpec.disabledSpec" , Feature.Query.PlanSpec.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.MaxAffectedSpec" , Feature.Query.Preferences.MaxAffectedSpec.spec)
|
||||||
, ("Feature.Query.Preferences.TimezoneSpec.enabledSpec", Feature.Query.Preferences.TimezoneSpec.enabledSpec)
|
, ("Feature.Query.Preferences.TimezoneSpec.enabledSpec", Feature.Query.Preferences.TimezoneSpec.enabledSpec)
|
||||||
, ("Feature.Query.QueryLimitedSpec" , Feature.Query.QueryLimitedSpec.spec)
|
, ("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.RangeSpec" , Feature.Query.RangeSpec.spec)
|
||||||
, ("Feature.Query.RawOutputTypesSpec" , Feature.Query.RawOutputTypesSpec.spec)
|
, ("Feature.Query.RawOutputTypesSpec" , Feature.Query.RawOutputTypesSpec.spec)
|
||||||
, ("Feature.Query.RelatedQueriesSpec" , Feature.Query.RelatedQueriesSpec.spec)
|
, ("Feature.Query.RelatedQueriesSpec" , Feature.Query.RelatedQueriesSpec.spec)
|
||||||
|
|||||||
Reference in New Issue
Block a user