4 -- These tests require track_utility to be enabled.
5 SET pg_stat_statements.track_utility = TRUE;
6 SELECT pg_stat_statements_reset() IS NOT NULL AS t;
13 -- SELECT is normalized.
14 DECLARE cursor_stats_1 CURSOR WITH HOLD FOR SELECT 1;
16 DECLARE cursor_stats_1 CURSOR WITH HOLD FOR SELECT 2;
18 SELECT calls, rows, query FROM pg_stat_statements ORDER BY query COLLATE "C";
20 -------+------+-------------------------------------------------------
21 2 | 0 | CLOSE cursor_stats_1
22 2 | 0 | DECLARE cursor_stats_1 CURSOR WITH HOLD FOR SELECT $1
23 1 | 1 | SELECT pg_stat_statements_reset() IS NOT NULL AS t
26 SELECT pg_stat_statements_reset() IS NOT NULL AS t;
34 DECLARE cursor_stats_1 CURSOR WITH HOLD FOR SELECT 2;
35 DECLARE cursor_stats_2 CURSOR WITH HOLD FOR SELECT 3;
36 FETCH 1 IN cursor_stats_1;
42 FETCH 1 IN cursor_stats_2;
51 SELECT calls, rows, query FROM pg_stat_statements ORDER BY query COLLATE "C";
53 -------+------+-------------------------------------------------------
55 1 | 0 | CLOSE cursor_stats_1
56 1 | 0 | CLOSE cursor_stats_2
58 1 | 0 | DECLARE cursor_stats_1 CURSOR WITH HOLD FOR SELECT $1
59 1 | 0 | DECLARE cursor_stats_2 CURSOR WITH HOLD FOR SELECT $1
60 1 | 1 | FETCH 1 IN cursor_stats_1
61 1 | 1 | FETCH 1 IN cursor_stats_2
62 1 | 1 | SELECT pg_stat_statements_reset() IS NOT NULL AS t
65 SELECT pg_stat_statements_reset() IS NOT NULL AS t;