-- Пакет 7.2. Expected совпадает с dbms_java_ncomp_oracle.sql.
|
-- Роль HR, чтобы ClassNotFound писал in <HR>.
|
CREATE OR REPLACE FUNCTION dbms_java_compile_class(classname varchar2)
|
RETURNS number LANGUAGE internal AS 'dbms_java_compile_class';
|
CREATE OR REPLACE FUNCTION dbms_java_compile_method(classname varchar2, methodname varchar2, methodsig varchar2)
|
RETURNS number LANGUAGE internal AS 'dbms_java_compile_method';
|
CREATE OR REPLACE FUNCTION dbms_java_uncompile_class(classname varchar2, permanentp number DEFAULT 0)
|
RETURNS number LANGUAGE internal AS 'dbms_java_uncompile_class';
|
CREATE OR REPLACE FUNCTION dbms_java_uncompile_method(classname varchar2, methodname varchar2, methodsig varchar2, permanentp number DEFAULT 0)
|
RETURNS number LANGUAGE internal AS 'dbms_java_uncompile_method';
|
CREATE OR REPLACE PROCEDURE dbms_java_dump_native_machine_code(classname varchar2, methodname varchar2, methodsig varchar2)
|
LANGUAGE internal AS 'dbms_java_dump_native_machine_code';
|
DO $$ BEGIN
|
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'HR') THEN
|
CREATE ROLE "HR" NOLOGIN;
|
END IF;
|
END $$;
|
CREATE SCHEMA IF NOT EXISTS "HR" AUTHORIZATION "HR";
|
GRANT EXECUTE ON FUNCTION dbms_java_compile_class(varchar2) TO "HR";
|
GRANT EXECUTE ON FUNCTION dbms_java_compile_method(varchar2, varchar2, varchar2) TO "HR";
|
GRANT EXECUTE ON FUNCTION dbms_java_uncompile_class(varchar2, number) TO "HR";
|
GRANT EXECUTE ON FUNCTION dbms_java_uncompile_method(varchar2, varchar2, varchar2, number) TO "HR";
|
GRANT EXECUTE ON PROCEDURE dbms_java_dump_native_machine_code(varchar2, varchar2, varchar2) TO "HR";
|
CALL dbms_java_create_source('Ncomp', $src$
|
public class Ncomp {
|
public static String hi() { return "ok"; }
|
public static int add(int a) { return a + 1; }
|
}
|
$src$, 'HR'::varchar2, true);
|
SET ROLE "HR";
|
SET search_path TO "HR", public;
|
-- 1
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_class(NULL::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
-- 2
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_class(''::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
-- 3
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_class('rjt.nosuch'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
-- 4
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_class('rjt.Ncomp'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.Ncomp in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.Ncomp in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.Ncomp in <HR>
|
-- 5
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_class('rjt/Ncomp'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt/Ncomp in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt/Ncomp in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt/Ncomp in <HR>
|
-- 6
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_compile_class('Ncomp'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=3';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=3
|
NOTICE: Actual: n=3
|
-- 7
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, 'hi'::varchar2, '()Ljava/lang/String;'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=0';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=0
|
NOTICE: Actual: n=0
|
-- 8
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, 'hi'::varchar2, '()java.lang.String'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=0';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=0
|
NOTICE: Actual: n=0
|
-- 9
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, 'add'::varchar2, '(I)I'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=0';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=0
|
NOTICE: Actual: n=0
|
-- 10
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, 'nope'::varchar2, '()V'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()
|
-- 11
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_method(NULL::varchar2, NULL::varchar2, NULL::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
-- 12
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, 'hi'::varchar2, NULL::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
-- 13
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_method('rjt.nosuch'::varchar2, 'hi'::varchar2, '()Ljava/lang/String;'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
-- 14
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_compile_method('Ncomp'::varchar2, NULL::varchar2, '()V'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
-- 15
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_uncompile_class('Ncomp'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=3';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=3
|
NOTICE: Actual: n=3
|
-- 16
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_uncompile_class('Ncomp'::varchar2, 0::number);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=3';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=3
|
NOTICE: Actual: n=3
|
-- 17
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_uncompile_class('Ncomp'::varchar2, 1::number);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=3';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=3
|
NOTICE: Actual: n=3
|
-- 18
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_class('rjt.nosuch'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
-- 19
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_class(NULL::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
-- 20
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_class(''::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException: Class name may not be null
|
-- 21
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_uncompile_method('Ncomp'::varchar2, 'hi'::varchar2, '()Ljava/lang/String;'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=1';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=1
|
NOTICE: Actual: n=1
|
-- 22
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
n := dbms_java_uncompile_method('Ncomp'::varchar2, 'hi'::varchar2, '()Ljava/lang/String;'::varchar2, 1::number);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
RAISE NOTICE 'Expected: n=1';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: n=1
|
NOTICE: Actual: n=1
|
-- 23
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_method('Ncomp'::varchar2, 'nope'::varchar2, '()V'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.nope()
|
-- 24
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_method('Ncomp'::varchar2, 'hi'::varchar2, NULL::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
-- 25
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_method('Ncomp'::varchar2, 'hi'::varchar2, '(I)I'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.hi(int)';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.hi(int)
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoSuchMethodException: Ncomp.hi(int)
|
-- 26
|
DO $$
|
DECLARE
|
msg text;
|
n number;
|
BEGIN
|
BEGIN
|
n := dbms_java_uncompile_method('rjt.nosuch'::varchar2, 'hi'::varchar2, '()V'::varchar2);
|
msg := 'n=' || COALESCE(n::text, 'NULL');
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassNotFoundException: rjt.nosuch in <HR>
|
-- 27
|
DO $$
|
DECLARE
|
msg text;
|
BEGIN
|
BEGIN
|
CALL dbms_java_dump_native_machine_code(NULL::varchar2, NULL::varchar2, NULL::varchar2);
|
msg := 'ok';
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
|
-- 28
|
DO $$
|
DECLARE
|
msg text;
|
BEGIN
|
BEGIN
|
CALL dbms_java_dump_native_machine_code('Ncomp'::varchar2, 'hi'::varchar2, '()Ljava/lang/String;'::varchar2);
|
msg := 'ok';
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
|
-- 29
|
DO $$
|
DECLARE
|
msg text;
|
BEGIN
|
BEGIN
|
CALL dbms_java_dump_native_machine_code('rjt.nosuch'::varchar2, 'hi'::varchar2, '()V'::varchar2);
|
msg := 'ok';
|
EXCEPTION WHEN OTHERS THEN
|
msg := SQLERRM;
|
END;
|
RAISE NOTICE 'Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException';
|
RAISE NOTICE 'Actual: %', msg;
|
END $$;
|
NOTICE: Expected: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
|
NOTICE: Actual: ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
|
RESET ROLE;
|
RESET search_path;
|
DO $$ BEGIN
|
DELETE FROM pg_catalog.dbms_java_object
|
WHERE schema_name = 'HR' AND (short_name = 'Ncomp' OR derived_from = 'Ncomp');
|
END $$;
|
DROP SCHEMA IF EXISTS "HR" CASCADE;
|
DROP OWNED BY "HR";
|
DROP ROLE IF EXISTS "HR";
|