Skip to content

Commit f6a2203

Browse files
committed
remove old functions for good
1 parent 64efec7 commit f6a2203

File tree

2 files changed

+33
-348
lines changed

2 files changed

+33
-348
lines changed

pg_wait_sampling--1.1--1.2.sql

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
44
\echo Use "ALTER EXTENSION pg_wait_sampling UPDATE TO 1.2" to load this file. \quit
55

6-
--DROP FUNCTION pg_wait_sampling_get_current (
7-
-- pid int4,
8-
-- OUT pid int4,
9-
-- OUT event_type text,
10-
-- OUT event text
11-
--) CASCADE;
12-
--
13-
--DROP FUNCTION pg_wait_sampling_get_history (
14-
-- OUT pid int4,
15-
-- OUT ts timestamptz,
16-
-- OUT event_type text,
17-
-- OUT event text
18-
--) CASCADE;
19-
--
20-
--DROP FUNCTION pg_wait_sampling_get_profile (
21-
-- OUT pid int4,
22-
-- OUT event_type text,
23-
-- OUT event text,
24-
-- OUT count bigint
25-
--) CASCADE;
6+
DROP FUNCTION pg_wait_sampling_get_current (
7+
pid int4,
8+
OUT pid int4,
9+
OUT event_type text,
10+
OUT event text
11+
) CASCADE;
12+
13+
DROP FUNCTION pg_wait_sampling_get_history (
14+
OUT pid int4,
15+
OUT ts timestamptz,
16+
OUT event_type text,
17+
OUT event text
18+
) CASCADE;
2619

27-
CREATE FUNCTION pg_wait_sampling_get_current_extended (
20+
DROP FUNCTION pg_wait_sampling_get_profile (
21+
OUT pid int4,
22+
OUT event_type text,
23+
OUT event text,
24+
OUT count bigint
25+
) CASCADE;
26+
27+
CREATE FUNCTION pg_wait_sampling_get_current (
2828
pid int4,
2929
OUT pid int4,
3030
OUT event_type text,
@@ -45,12 +45,12 @@ RETURNS SETOF record
4545
AS 'MODULE_PATHNAME'
4646
LANGUAGE C VOLATILE CALLED ON NULL INPUT;
4747

48-
CREATE VIEW pg_wait_sampling_current_extended AS
49-
SELECT * FROM pg_wait_sampling_get_current_extended(NULL::integer);
48+
CREATE VIEW pg_wait_sampling_current AS
49+
SELECT * FROM pg_wait_sampling_get_current(NULL::integer);
5050

5151
GRANT SELECT ON pg_wait_sampling_current TO PUBLIC;
5252

53-
CREATE FUNCTION pg_wait_sampling_get_history_extended (
53+
CREATE FUNCTION pg_wait_sampling_get_history (
5454
OUT pid int4,
5555
OUT event_type text,
5656
OUT event text,
@@ -71,12 +71,12 @@ RETURNS SETOF record
7171
AS 'MODULE_PATHNAME'
7272
LANGUAGE C VOLATILE STRICT;
7373

74-
CREATE VIEW pg_wait_sampling_history_extended AS
75-
SELECT * FROM pg_wait_sampling_get_history_extended();
74+
CREATE VIEW pg_wait_sampling_history AS
75+
SELECT * FROM pg_wait_sampling_get_history();
7676

77-
GRANT SELECT ON pg_wait_sampling_history_extended TO PUBLIC;
77+
GRANT SELECT ON pg_wait_sampling_history TO PUBLIC;
7878

79-
CREATE FUNCTION pg_wait_sampling_get_profile_extended (
79+
CREATE FUNCTION pg_wait_sampling_get_profile (
8080
OUT pid int4,
8181
OUT event_type text,
8282
OUT event text,
@@ -97,10 +97,10 @@ RETURNS SETOF record
9797
AS 'MODULE_PATHNAME'
9898
LANGUAGE C VOLATILE STRICT;
9999

100-
CREATE VIEW pg_wait_sampling_profile_extended AS
101-
SELECT * FROM pg_wait_sampling_get_profile_extended();
100+
CREATE VIEW pg_wait_sampling_profile AS
101+
SELECT * FROM pg_wait_sampling_get_profile();
102102

103-
GRANT SELECT ON pg_wait_sampling_profile_extended TO PUBLIC;
103+
GRANT SELECT ON pg_wait_sampling_profile TO PUBLIC;
104104

105105
CREATE FUNCTION pg_wait_sampling_reset_history()
106106
RETURNS void
@@ -109,10 +109,3 @@ LANGUAGE C VOLATILE STRICT;
109109

110110
-- Don't want this to be available to non-superusers.
111111
REVOKE ALL ON FUNCTION pg_wait_sampling_reset_history() FROM PUBLIC;
112-
113-
--CREATE VIEW pg_wait_sampling_profile AS
114-
-- SELECT pid, event_type, event, queryid, SUM(count) FROM pg_wait_sampling_profile_extended
115-
-- GROUP BY pid, event_type, event, queryid;
116-
--
117-
--GRANT SELECT ON pg_wait_sampling_profile TO PUBLIC;
118-

0 commit comments

Comments
 (0)