-
Notifications
You must be signed in to change notification settings - Fork 0
/
pg_log_statements--0.0.2.sql
40 lines (40 loc) · 1.28 KB
/
pg_log_statements--0.0.2.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
-- \echo Use "CREATE EXTENSION pg_log_statement" to load this file . \quit
DROP FUNCTION IF EXISTS pgls_start();
DROP FUNCTION IF EXISTS pgls_stop();
DROP FUNCTION IF EXISTS pgls_start_filter();
DROP FUNCTION IF EXISTS pgls_stop_filter();
DROP FUNCTION IF EXISTS pgls_state();
DROP FUNCTION IF EXISTS pgls_start_debug();
DROP FUNCTION IF EXISTS pgls_stop_debug();
--
CREATE FUNCTION pgls_start(int) RETURNS bool
AS 'pg_log_statements.so', 'pgls_start'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_stop(int) RETURNS bool
AS 'pg_log_statements.so', 'pgls_stop'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_start_filter(cstring, cstring) RETURNS bool
AS 'pg_log_statements.so', 'pgls_start_filter'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_stop_filter(cstring, cstring) RETURNS bool
AS 'pg_log_statements.so', 'pgls_stop_filter'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_state() RETURNS setof record
AS 'pg_log_statements.so', 'pgls_state'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_conf() RETURNS setof record
AS 'pg_log_statements.so', 'pgls_conf'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_start_debug() RETURNS bool
AS 'pg_log_statements.so', 'pgls_start_debug'
LANGUAGE C STRICT;
--
CREATE FUNCTION pgls_stop_debug() RETURNS bool
AS 'pg_log_statements.so', 'pgls_stop_debug'
LANGUAGE C STRICT;