SET client_min_messages = notice; DROP TABLE IF EXISTS t_xmlstore_service; CREATE TABLE t_xmlstore_service ( id int4 ); DO $$ DECLARE v_handle int4; BEGIN RAISE NOTICE 'Expected: DBMS_XMLSTORE context closed'; v_handle := dbms_xmlstore_newcontext('t_xmlstore_service'::varchar2); PERFORM dbms_xmlstore_closecontext_tmp(v_handle, 0::int4); RAISE NOTICE 'Actual: DBMS_XMLSTORE context closed'; END; $$; DROP TABLE IF EXISTS t_xmlstore_service;