Skip to content

Commit 5d5e73d

Browse files
committed
Merge branch 'fix-failing-tests-14'
2 parents 4a7aea9 + 21ebcd5 commit 5d5e73d

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

.github/workflows/installcheck.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- 17
2121
- 16
2222
- 15
23+
- 14
2324

2425
env:
2526
PGVERSION: ${{ matrix.pgversion }}

expected/formats_2.out

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
-- explain output on PG12/13 is missing "Async Capable"
2+
select setting::int < 140000 as pg12_13 from pg_settings where name = 'server_version_num';
3+
pg12_13
4+
---------
5+
f
6+
(1 row)
7+
8+
-- json output
9+
set pg_show_plans.plan_format = 'json';
10+
ERROR: parameter "pg_show_plans.plan_format" cannot be changed without restarting the server
11+
show pg_show_plans.plan_format;
12+
pg_show_plans.plan_format
13+
---------------------------
14+
text
15+
(1 row)
16+
17+
select * from nest();
18+
level | plan
19+
-------+----------------------------------------------------------------------
20+
0 | Function Scan on nest (cost=0.25..10.25 rows=1000 width=36)
21+
1 | Function Scan on pg_show_plans (cost=0.00..12.50 rows=333 width=36)+
22+
| Filter: (level >= 0)
23+
(2 rows)
24+
25+
-- yaml output
26+
set pg_show_plans.plan_format = 'yaml';
27+
ERROR: parameter "pg_show_plans.plan_format" cannot be changed without restarting the server
28+
show pg_show_plans.plan_format;
29+
pg_show_plans.plan_format
30+
---------------------------
31+
text
32+
(1 row)
33+
34+
select * from nest();
35+
level | plan
36+
-------+----------------------------------------------------------------------
37+
0 | Function Scan on nest (cost=0.25..10.25 rows=1000 width=36)
38+
1 | Function Scan on pg_show_plans (cost=0.00..12.50 rows=333 width=36)+
39+
| Filter: (level >= 0)
40+
(2 rows)
41+
42+
-- xml output
43+
set pg_show_plans.plan_format = 'xml';
44+
ERROR: parameter "pg_show_plans.plan_format" cannot be changed without restarting the server
45+
show pg_show_plans.plan_format;
46+
pg_show_plans.plan_format
47+
---------------------------
48+
text
49+
(1 row)
50+
51+
select * from nest();
52+
level | plan
53+
-------+----------------------------------------------------------------------
54+
0 | Function Scan on nest (cost=0.25..10.25 rows=1000 width=36)
55+
1 | Function Scan on pg_show_plans (cost=0.00..12.50 rows=333 width=36)+
56+
| Filter: (level >= 0)
57+
(2 rows)
58+
59+
-- check plan format after reconnect
60+
\c
61+
show pg_show_plans.plan_format;
62+
pg_show_plans.plan_format
63+
---------------------------
64+
text
65+
(1 row)
66+

expected/pg_show_plans_1.out

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
create extension pg_show_plans;
2+
show pg_show_plans.is_enabled;
3+
pg_show_plans.is_enabled
4+
--------------------------
5+
on
6+
(1 row)
7+
8+
show pg_show_plans.max_plan_length;
9+
pg_show_plans.max_plan_length
10+
-------------------------------
11+
16384
12+
(1 row)
13+
14+
create function nest()
15+
returns table (level int, plan text)
16+
language plpgsql
17+
as $$
18+
begin
19+
return query
20+
select pg_show_plans.level, pg_show_plans.plan from pg_show_plans
21+
where pg_show_plans.level >= 0;
22+
end;
23+
$$;
24+
-- text output
25+
set pg_show_plans.plan_format = 'text';
26+
ERROR: parameter "pg_show_plans.plan_format" cannot be changed without restarting the server
27+
show pg_show_plans.plan_format;
28+
pg_show_plans.plan_format
29+
---------------------------
30+
text
31+
(1 row)
32+
33+
select level, plan from pg_show_plans;
34+
level | plan
35+
-------+-----------------------------------------------------------------------
36+
0 | Function Scan on pg_show_plans (cost=0.00..10.00 rows=1000 width=36)
37+
(1 row)
38+
39+
select * from nest();
40+
level | plan
41+
-------+----------------------------------------------------------------------
42+
0 | Function Scan on nest (cost=0.25..10.25 rows=1000 width=36)
43+
1 | Function Scan on pg_show_plans (cost=0.00..12.50 rows=333 width=36)+
44+
| Filter: (level >= 0)
45+
(2 rows)
46+

0 commit comments

Comments
 (0)