-- setups create extension if not exists gms_debug; drop schema if exists gms_debugger_test3 cascade; NOTICE: schema "gms_debugger_test3" does not exist, skipping create schema gms_debugger_test3; set search_path = gms_debugger_test3; -- test for implicit variables CREATE OR REPLACE function test_debug3(a in integer) return integer AS declare b int; BEGIN CASE a WHEN 1 THEN b := 111; ELSE b := 999; END CASE; raise info 'pi_return : %',pi_return ; return b; EXCEPTION WHEN others THEN b := 101; return b; END; / select * from gms_debug.initialize(); initialize ------------- datanode1-0 (1 row) select pg_sleep(1); pg_sleep ---------- (1 row) -- start debug - 1st run select * from test_debug3(1); test_debug3 ------------- 101 (1 row) -- start debug - 2nd run - to be aborted select * from test_debug3(1); ERROR: receive abort message CONTEXT: PL/pgSQL function test_debug3(integer) line 13 at assignment drop schema gms_debugger_test3 cascade; NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to function test_debug3(integer) drop cascades to function gms_next() drop cascades to function gms_continue()