File: queries.sql

package info (click to toggle)
pg-wait-sampling 1.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184 kB
  • sloc: ansic: 1,293; sql: 119; makefile: 22; sh: 17
file content (18 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE EXTENSION pg_wait_sampling;

WITH t as (SELECT sum(0) FROM pg_wait_sampling_current)
	SELECT sum(0) FROM generate_series(1, 2), t;

WITH t as (SELECT sum(0) FROM pg_wait_sampling_history)
	SELECT sum(0) FROM generate_series(1, 2), t;

WITH t as (SELECT sum(0) FROM pg_wait_sampling_profile)
	SELECT sum(0) FROM generate_series(1, 2), t;

-- Some dummy checks just to be sure that all our functions work and return something.
SELECT count(*) = 1 as test FROM pg_wait_sampling_get_current(pg_backend_pid());
SELECT count(*) >= 0 as test FROM pg_wait_sampling_get_profile();
SELECT count(*) >= 0 as test FROM pg_wait_sampling_get_history();
SELECT pg_wait_sampling_reset_profile();

DROP EXTENSION pg_wait_sampling;