Skip to content

Commit

Permalink
Run CI tests on PG17 (beta) (npgsql#3256)
Browse files Browse the repository at this point in the history
  • Loading branch information
roji authored and WhatzGames committed Dec 18, 2024
1 parent a2ac8bd commit 22cc147
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- os: ubuntu-22.04
pg_major: 16
config: Debug
# - os: ubuntu-22.04
# pg_major: 17
# config: Release
# pg_prerelease: 'PG Prerelease'
- os: ubuntu-22.04
pg_major: 17
config: Release
pg_prerelease: 'PG Prerelease'

outputs:
is_release: ${{ steps.analyze_tag.outputs.is_release }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,11 @@ private static void GetCollations(
var commandText = $"""
SELECT
nspname, collname, collprovider, collcollate, collctype,
{(connection.PostgreSqlVersion >= new Version(15, 0) ? "colliculocale" : "NULL AS colliculocale")},
{(connection.PostgreSqlVersion.Major switch {
>= 17 => "colllocale",
>= 15 => "colliculocale AS colllocale",
_ => "NULL AS colllocale"
})},
{(connection.PostgreSqlVersion >= new Version(12, 0) ? "collisdeterministic" : "true AS collisdeterministic")}
FROM pg_collation coll
JOIN pg_namespace ns ON ns.oid=coll.collnamespace
Expand All @@ -1183,7 +1187,7 @@ nspname NOT IN ({internalSchemas})
{
var schema = reader.GetString(reader.GetOrdinal("nspname"));
var name = reader.GetString(reader.GetOrdinal("collname"));
var icuLocale = reader.GetValueOrDefault<string>("colliculocale");
var icuLocale = reader.GetValueOrDefault<string>("colllocale");
var lcCollate = reader.GetValueOrDefault<string>("collcollate");
var lcCtype = reader.GetValueOrDefault<string>("collctype");
var providerCode = reader.GetChar(reader.GetOrdinal("collprovider"));
Expand Down

0 comments on commit 22cc147

Please sign in to comment.