Skip to content

Commit

Permalink
add modification for pg16 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
PerikAdjust committed Mar 12, 2024
1 parent 443e5af commit bd6817e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
test:
strategy:
matrix:
pg: [15, 14, 13, 12, 11, 10]
pg: [16]
#pg: [15, 14, 13, 12, 11, 10]
name: 🐘 PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
Expand Down
9 changes: 8 additions & 1 deletion test/expected/parallel_test.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
BEGIN;
create extension country;
SET max_parallel_workers_per_gather=4;
SET force_parallel_mode=on;
DO $$
BEGIN
IF current_setting('server_version_num')::int >= 160000 THEN
EXECUTE 'SET debug_parallel_query = on';
ELSE
EXECUTE 'SET force_parallel_mode = on';
END IF;
END $$;
CREATE TABLE parallel_test(i int, c country) WITH (parallel_workers = 4);
INSERT INTO parallel_test (i, c)
SELECT i, c.country
Expand Down
9 changes: 8 additions & 1 deletion test/expected/parallel_test_0.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
BEGIN;
create extension country;
SET max_parallel_workers_per_gather=4;
SET force_parallel_mode=on;
DO $$
BEGIN
IF current_setting('server_version_num')::int >= 160000 THEN
EXECUTE 'SET debug_parallel_query = on';
ELSE
EXECUTE 'SET force_parallel_mode = on';
END IF;
END $$;
CREATE TABLE parallel_test(i int, c country) WITH (parallel_workers = 4);
INSERT INTO parallel_test (i, c)
SELECT i, c.country
Expand Down
9 changes: 8 additions & 1 deletion test/expected/parallel_test_1.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
BEGIN;
create extension country;
SET max_parallel_workers_per_gather=4;
SET force_parallel_mode=on;
DO $$
BEGIN
IF current_setting('server_version_num')::int >= 160000 THEN
EXECUTE 'SET debug_parallel_query = on';
ELSE
EXECUTE 'SET force_parallel_mode = on';
END IF;
END $$;
CREATE TABLE parallel_test(i int, c country) WITH (parallel_workers = 4);
INSERT INTO parallel_test (i, c)
SELECT i, c.country
Expand Down
9 changes: 8 additions & 1 deletion test/sql/parallel_test.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
BEGIN;
create extension country;
SET max_parallel_workers_per_gather=4;
SET force_parallel_mode=on;
DO $$
BEGIN
IF current_setting('server_version_num')::int >= 160000 THEN
EXECUTE 'SET debug_parallel_query = on';
ELSE
EXECUTE 'SET force_parallel_mode = on';
END IF;
END $$;

CREATE TABLE parallel_test(i int, c country) WITH (parallel_workers = 4);
INSERT INTO parallel_test (i, c)
Expand Down

0 comments on commit bd6817e

Please sign in to comment.