Skip to content

Commit 6242acb

Browse files
committed
Add new expected tests results for version 18
1 parent de1d774 commit 6242acb

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

expected/formats_1.out

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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+
show pg_show_plans.plan_format;
11+
pg_show_plans.plan_format
12+
---------------------------
13+
json
14+
(1 row)
15+
16+
select * from nest();
17+
level | plan
18+
-------+---------------------------------------
19+
0 | [ +
20+
| "Plan": { +
21+
| "Node Type": "Function Scan", +
22+
| "Parallel Aware": false, +
23+
| "Async Capable": false, +
24+
| "Function Name": "nest", +
25+
| "Alias": "nest", +
26+
| "Startup Cost": 0.25, +
27+
| "Total Cost": 10.25, +
28+
| "Plan Rows": 1000, +
29+
| "Plan Width": 36, +
30+
| "Disabled": false +
31+
| } +
32+
| ]
33+
1 | [ +
34+
| "Plan": { +
35+
| "Node Type": "Function Scan", +
36+
| "Parallel Aware": false, +
37+
| "Async Capable": false, +
38+
| "Function Name": "pg_show_plans",+
39+
| "Alias": "pg_show_plans", +
40+
| "Startup Cost": 0.00, +
41+
| "Total Cost": 12.50, +
42+
| "Plan Rows": 333, +
43+
| "Plan Width": 36, +
44+
| "Disabled": false, +
45+
| "Filter": "(level >= 0)" +
46+
| } +
47+
| ]
48+
(2 rows)
49+
50+
-- yaml output
51+
set pg_show_plans.plan_format = 'yaml';
52+
show pg_show_plans.plan_format;
53+
pg_show_plans.plan_format
54+
---------------------------
55+
yaml
56+
(1 row)
57+
58+
select * from nest();
59+
level | plan
60+
-------+----------------------------------
61+
0 | Plan: +
62+
| Node Type: "Function Scan" +
63+
| Parallel Aware: false +
64+
| Async Capable: false +
65+
| Function Name: "nest" +
66+
| Alias: "nest" +
67+
| Startup Cost: 0.25 +
68+
| Total Cost: 10.25 +
69+
| Plan Rows: 1000 +
70+
| Plan Width: 36 +
71+
| Disabled: false
72+
1 | Plan: +
73+
| Node Type: "Function Scan" +
74+
| Parallel Aware: false +
75+
| Async Capable: false +
76+
| Function Name: "pg_show_plans"+
77+
| Alias: "pg_show_plans" +
78+
| Startup Cost: 0.00 +
79+
| Total Cost: 12.50 +
80+
| Plan Rows: 333 +
81+
| Plan Width: 36 +
82+
| Disabled: false +
83+
| Filter: "(level >= 0)"
84+
(2 rows)
85+
86+
-- xml output
87+
set pg_show_plans.plan_format = 'xml';
88+
show pg_show_plans.plan_format;
89+
pg_show_plans.plan_format
90+
---------------------------
91+
xml
92+
(1 row)
93+
94+
select * from nest();
95+
level | plan
96+
-------+----------------------------------------------------------
97+
0 | <explain xmlns="http://www.postgresql.org/2009/explain">+
98+
| <Plan> +
99+
| <Node-Type>Function Scan</Node-Type> +
100+
| <Parallel-Aware>false</Parallel-Aware> +
101+
| <Async-Capable>false</Async-Capable> +
102+
| <Function-Name>nest</Function-Name> +
103+
| <Alias>nest</Alias> +
104+
| <Startup-Cost>0.25</Startup-Cost> +
105+
| <Total-Cost>10.25</Total-Cost> +
106+
| <Plan-Rows>1000</Plan-Rows> +
107+
| <Plan-Width>36</Plan-Width> +
108+
| <Disabled>false</Disabled> +
109+
| </Plan> +
110+
| </explain>
111+
1 | <explain xmlns="http://www.postgresql.org/2009/explain">+
112+
| <Plan> +
113+
| <Node-Type>Function Scan</Node-Type> +
114+
| <Parallel-Aware>false</Parallel-Aware> +
115+
| <Async-Capable>false</Async-Capable> +
116+
| <Function-Name>pg_show_plans</Function-Name> +
117+
| <Alias>pg_show_plans</Alias> +
118+
| <Startup-Cost>0.00</Startup-Cost> +
119+
| <Total-Cost>12.50</Total-Cost> +
120+
| <Plan-Rows>333</Plan-Rows> +
121+
| <Plan-Width>36</Plan-Width> +
122+
| <Disabled>false</Disabled> +
123+
| <Filter>(level &gt;= 0)</Filter> +
124+
| </Plan> +
125+
| </explain>
126+
(2 rows)
127+
128+
-- check plan format after reconnect
129+
\c
130+
show pg_show_plans.plan_format;
131+
pg_show_plans.plan_format
132+
---------------------------
133+
xml
134+
(1 row)
135+

0 commit comments

Comments
 (0)