-
Notifications
You must be signed in to change notification settings - Fork 0
/
plprofiler--3.5--4.0.sql
60 lines (50 loc) · 1.92 KB
/
plprofiler--3.5--4.0.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION plprofiler UPDATE TO '4.0'" to load this file. \quit
-- Drop obsolete function
DROP FUNCTION pl_profiler_enable(bool);
-- Create new functions
CREATE FUNCTION pl_profiler_set_enabled_global(enabled bool)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_set_enabled_global(bool) OWNER TO plprofiler;
CREATE FUNCTION pl_profiler_get_enabled_global()
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_get_enabled_global() OWNER TO plprofiler;
GRANT EXECUTE ON FUNCTION pl_profiler_get_enabled_global() TO public;
CREATE FUNCTION pl_profiler_set_enabled_local(enabled bool)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_set_enabled_local(bool) OWNER TO plprofiler;
GRANT EXECUTE ON FUNCTION pl_profiler_set_enabled_local(bool) TO public;
CREATE FUNCTION pl_profiler_get_enabled_local()
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_get_enabled_local() OWNER TO plprofiler;
GRANT EXECUTE ON FUNCTION pl_profiler_get_enabled_local() TO public;
CREATE FUNCTION pl_profiler_set_enabled_pid(pid int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_set_enabled_pid(int4) OWNER TO plprofiler;
CREATE FUNCTION pl_profiler_get_enabled_pid()
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_get_enabled_pid() OWNER TO plprofiler;
GRANT EXECUTE ON FUNCTION pl_profiler_get_enabled_pid() TO public;
CREATE FUNCTION pl_profiler_set_collect_interval(seconds int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_set_collect_interval(int4) OWNER TO plprofiler;
CREATE FUNCTION pl_profiler_get_collect_interval()
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
ALTER FUNCTION pl_profiler_get_collect_interval() OWNER TO plprofiler;
GRANT EXECUTE ON FUNCTION pl_profiler_get_collect_interval() TO public;