我正在尝试从包中定义的函数内部调用 SYS.DBMS_RLS.ENABLE_POLICY()。但它显示以下错误:
错误(19,16):PLS-00201:必须声明标识符“SYS.DBMS_RLS”
代码:
CREATE OR REPLACE PACKAGE BODY foopackage IS
FUNCTION foobar RETURN t_table PIPELINED IS
BEGIN
EXECUTE(SYS.DBMS_RLS.ENABLE_POLICY( -- error in this line
object_schema => 'foo',
object_name => 'bar',
policy_name =>'bar2',
enable => FALSE
));
-- some more code
EXECUTE(SYS.DBMS_RLS.ENABLE_POLICY( -- error in this line
object_schema => 'foo',
object_name => 'bar',
policy_name =>'bar2',
enable => TRUE
));
RETURN;
END;
END foopackage;