-
Notifications
You must be signed in to change notification settings - Fork 19
/
pldbgapi--unpackaged--1.1.sql
54 lines (44 loc) · 2.51 KB
/
pldbgapi--unpackaged--1.1.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
-- pldbgapi--unpackaged--1.1.sql
-- This script converts an existing API installation to an extension.
--
-- Copyright (c) 2004-2024 EnterpriseDB Corporation. All Rights Reserved.
--
-- Licensed under the Artistic License v2.0, see
-- https://opensource.org/licenses/artistic-license-2.0
-- for full details
ALTER EXTENSION pldbgapi ADD TYPE breakpoint;
ALTER EXTENSION pldbgapi ADD TYPE frame;
ALTER EXTENSION pldbgapi ADD TYPE targetinfo;
ALTER EXTENSION pldbgapi ADD TYPE var;
ALTER EXTENSION pldbgapi ADD TYPE proxyInfo;
ALTER EXTENSION pldbgapi ADD FUNCTION plpgsql_oid_debug( functionOID OID );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_abort_target( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_attach_to_port( portNumber INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_continue( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_create_listener();
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_deposit_value( session INTEGER, varName TEXT, lineNumber INTEGER, value TEXT );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_drop_breakpoint( session INTEGER, func OID, linenumber INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_breakpoints( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_source( session INTEGER, func OID );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_stack( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_proxy_info( );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_variables( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_select_frame( session INTEGER, frame INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_set_breakpoint( session INTEGER, func OID, linenumber INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_set_global_breakpoint( session INTEGER, func OID, linenumber INTEGER, targetPID INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_step_into( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_step_over( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_wait_for_breakpoint( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_wait_for_target( session INTEGER );
ALTER EXTENSION pldbgapi ADD FUNCTION pldbg_get_target_info( signature TEXT, targetType "char" );
DO $do$
declare
isedb bool;
begin
isedb = (SELECT version() LIKE '%EnterpriseDB%');
-- Add a couple of EDB specific functions
IF isedb THEN
ALTER EXTENSION pldbgapi ADD edb_oid_debug( functionOID oid );
ALTER EXTENSION pldbgapi ADD pldbg_get_pkg_cons( packageOID oid );
END IF;
$do$;