-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathomnidb_plpgsql_debugger--1.0.0.sql
More file actions
48 lines (41 loc) · 1.11 KB
/
omnidb_plpgsql_debugger--1.0.0.sql
File metadata and controls
48 lines (41 loc) · 1.11 KB
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
\echo Use "CREATE EXTENSION omnidb_plpgsql_debugger" to load this file. \quit
CREATE SCHEMA omnidb;
CREATE FUNCTION omnidb.omnidb_enable_debugger(character varying)
RETURNS void AS '$libdir/omnidb_plpgsql_debugger'
LANGUAGE C IMMUTABLE STRICT;
CREATE TABLE omnidb.contexts
(
pid INTEGER NOT NULL PRIMARY KEY,
function TEXT,
hook TEXT,
lineno INTEGER,
stmttype TEXT,
breakpoint INTEGER NOT NULL,
finished BOOLEAN
);
CREATE TABLE omnidb.variables
(
pid INTEGER NOT NULL,
name TEXT,
attribute TEXT,
vartype TEXT,
value TEXT
);
ALTER TABLE omnidb.variables
ADD CONSTRAINT omnidb_variables_contexts_fk
FOREIGN KEY (pid)
REFERENCES omnidb.contexts (pid)
ON DELETE CASCADE;
CREATE TABLE omnidb.statistics
(
pid INTEGER NOT NULL,
lineno INTEGER,
step INTEGER,
tstart TIMESTAMP WITHOUT TIME ZONE,
tend TIMESTAMP WITHOUT TIME ZONE
);
ALTER TABLE omnidb.statistics
ADD CONSTRAINT omnidb_statistics_contexts_fk
FOREIGN KEY (pid)
REFERENCES omnidb.contexts (pid)
ON DELETE CASCADE;