File: formats.sql

package info (click to toggle)
pg-show-plans 2.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 172 kB
  • sloc: ansic: 527; sql: 86; makefile: 27; sh: 1
file content (21 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- explain output on PG12/13 is missing "Async Capable"
select setting::int < 140000 as pg12_13 from pg_settings where name = 'server_version_num';

-- json output
set pg_show_plans.plan_format = 'json';
show pg_show_plans.plan_format;
select * from nest();

-- yaml output
set pg_show_plans.plan_format = 'yaml';
show pg_show_plans.plan_format;
select * from nest();

-- xml output
set pg_show_plans.plan_format = 'xml';
show pg_show_plans.plan_format;
select * from nest();

-- check plan format after reconnect
\c
show pg_show_plans.plan_format;