Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit910c3ec

Browse files
committed
Change scripts
1 parentf943143 commit910c3ec

File tree

3 files changed

+117
-1
lines changed

3 files changed

+117
-1
lines changed

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
*.o
33
*.so
44
/results
5-
*.log
5+
*pg_wait_sampling--1.1.sql
6+
.log

‎pg_wait_sampling--1.0--1.1.sql

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* contrib/pg_wait_sampling/pg_wait_sampling--1.0--1.1.sql*/
2+
3+
DROPFUNCTION pg_wait_sampling_get_current (
4+
pid int4,
5+
OUT pid int4,
6+
OUT event_typetext,
7+
OUT eventtext
8+
);
9+
10+
DROPFUNCTION pg_wait_sampling_get_history (
11+
OUT pid int4,
12+
OUT tstimestamptz,
13+
OUT event_typetext,
14+
OUT eventtext
15+
);
16+
17+
DROPFUNCTION pg_wait_sampling_get_profile (
18+
OUT pid int4,
19+
OUT event_typetext,
20+
OUT eventtext,
21+
OUT countbigint
22+
);
23+
24+
CREATEFUNCTIONpg_wait_sampling_get_current (
25+
pid int4,
26+
OUT pid int4,
27+
OUT event_typetext,
28+
OUT eventtext,
29+
OUT queryid int8
30+
)
31+
RETURNS SETOF record
32+
AS'MODULE_PATHNAME'
33+
LANGUAGE C VOLATILE CALLEDONNULL INPUT;
34+
35+
CREATEFUNCTIONpg_wait_sampling_get_history (
36+
OUT pid int4,
37+
OUT tstimestamptz,
38+
OUT event_typetext,
39+
OUT eventtext,
40+
OUT queryid int8
41+
)
42+
RETURNS SETOF record
43+
AS'MODULE_PATHNAME'
44+
LANGUAGE C VOLATILE STRICT;
45+
46+
CREATEFUNCTIONpg_wait_sampling_get_profile (
47+
OUT pid int4,
48+
OUT event_typetext,
49+
OUT eventtext,
50+
OUT queryid int8,
51+
OUT count int8
52+
)
53+
RETURNS SETOF record
54+
AS'MODULE_PATHNAME'
55+
LANGUAGE C VOLATILE STRICT;

‎setup.sql

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/* contrib/pg_wait_sampling/setup.sql*/
2+
3+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4+
\echo Use"CREATE EXTENSION pg_wait_sampling" to load this file. \quit
5+
6+
CREATEFUNCTIONpg_wait_sampling_get_current (
7+
pid int4,
8+
OUT pid int4,
9+
OUT event_typetext,
10+
OUT eventtext,
11+
OUT queryid int8
12+
)
13+
RETURNS SETOF record
14+
AS'MODULE_PATHNAME'
15+
LANGUAGE C VOLATILE CALLEDONNULL INPUT;
16+
17+
CREATEVIEWpg_wait_sampling_currentAS
18+
SELECT*FROM pg_wait_sampling_get_current(NULL::integer);
19+
20+
GRANTSELECTON pg_wait_sampling_current TO PUBLIC;
21+
22+
CREATEFUNCTIONpg_wait_sampling_get_history (
23+
OUT pid int4,
24+
OUT tstimestamptz,
25+
OUT event_typetext,
26+
OUT eventtext,
27+
OUT queryid int8
28+
)
29+
RETURNS SETOF record
30+
AS'MODULE_PATHNAME'
31+
LANGUAGE C VOLATILE STRICT;
32+
33+
CREATEVIEWpg_wait_sampling_historyAS
34+
SELECT*FROM pg_wait_sampling_get_history();
35+
36+
GRANTSELECTON pg_wait_sampling_history TO PUBLIC;
37+
38+
CREATEFUNCTIONpg_wait_sampling_get_profile (
39+
OUT pid int4,
40+
OUT event_typetext,
41+
OUT eventtext,
42+
OUT queryid int8,
43+
OUT count int8
44+
)
45+
RETURNS SETOF record
46+
AS'MODULE_PATHNAME'
47+
LANGUAGE C VOLATILE STRICT;
48+
49+
CREATEVIEWpg_wait_sampling_profileAS
50+
SELECT*FROM pg_wait_sampling_get_profile();
51+
52+
GRANTSELECTON pg_wait_sampling_profile TO PUBLIC;
53+
54+
CREATEFUNCTIONpg_wait_sampling_reset_profile()
55+
RETURNS void
56+
AS'MODULE_PATHNAME'
57+
LANGUAGE C VOLATILE STRICT;
58+
59+
-- Don't want this to be available to non-superusers.
60+
REVOKE ALLON FUNCTION pg_wait_sampling_reset_profile()FROM PUBLIC;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp