1 /* contrib/pg_stat_statements/pg_stat_statements--1.9--1.10.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION pg_stat_statements UPDATE TO '1.10'" to load this file. \quit
6 /* First we have to remove them from the extension */
7 ALTER EXTENSION pg_stat_statements DROP VIEW pg_stat_statements;
8 ALTER EXTENSION pg_stat_statements DROP FUNCTION pg_stat_statements(boolean);
10 /* Then we can drop them */
11 DROP VIEW pg_stat_statements;
12 DROP FUNCTION pg_stat_statements(boolean);
15 CREATE FUNCTION pg_stat_statements(IN showtext boolean,
22 OUT total_plan_time float8,
23 OUT min_plan_time float8,
24 OUT max_plan_time float8,
25 OUT mean_plan_time float8,
26 OUT stddev_plan_time float8,
28 OUT total_exec_time float8,
29 OUT min_exec_time float8,
30 OUT max_exec_time float8,
31 OUT mean_exec_time float8,
32 OUT stddev_exec_time float8,
34 OUT shared_blks_hit int8,
35 OUT shared_blks_read int8,
36 OUT shared_blks_dirtied int8,
37 OUT shared_blks_written int8,
38 OUT local_blks_hit int8,
39 OUT local_blks_read int8,
40 OUT local_blks_dirtied int8,
41 OUT local_blks_written int8,
42 OUT temp_blks_read int8,
43 OUT temp_blks_written int8,
44 OUT blk_read_time float8,
45 OUT blk_write_time float8,
46 OUT temp_blk_read_time float8,
47 OUT temp_blk_write_time float8,
50 OUT wal_bytes numeric,
51 OUT jit_functions int8,
52 OUT jit_generation_time float8,
53 OUT jit_inlining_count int8,
54 OUT jit_inlining_time float8,
55 OUT jit_optimization_count int8,
56 OUT jit_optimization_time float8,
57 OUT jit_emission_count int8,
58 OUT jit_emission_time float8
61 AS 'MODULE_PATHNAME', 'pg_stat_statements_1_10'
62 LANGUAGE C STRICT VOLATILE PARALLEL SAFE;
64 CREATE VIEW pg_stat_statements AS
65 SELECT * FROM pg_stat_statements(true);
67 GRANT SELECT ON pg_stat_statements TO PUBLIC;