1 /* contrib/pg_stat_statements/pg_stat_statements--1.0--1.1.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.1'" 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();
10 /* Then we can drop them */
11 DROP VIEW pg_stat_statements;
12 DROP FUNCTION pg_stat_statements();
15 CREATE FUNCTION pg_stat_statements(
20 OUT total_time float8,
22 OUT shared_blks_hit int8,
23 OUT shared_blks_read int8,
24 OUT shared_blks_dirtied int8,
25 OUT shared_blks_written int8,
26 OUT local_blks_hit int8,
27 OUT local_blks_read int8,
28 OUT local_blks_dirtied int8,
29 OUT local_blks_written int8,
30 OUT temp_blks_read int8,
31 OUT temp_blks_written int8,
32 OUT blk_read_time float8,
33 OUT blk_write_time float8
39 CREATE VIEW pg_stat_statements AS
40 SELECT * FROM pg_stat_statements();
42 GRANT SELECT ON pg_stat_statements TO PUBLIC;