我写了如下函数:
create or replace function function1 (schema_obj varchar2, tbl_obj varchar2)
return varchar2 is
r_es varchar2(1000);
BEGIN
r_es := 'opo.p_id= (select p_id from mo.pato where upper(pname)=
(select sys_context(''userenv'',''session_user'') from dual))';
RETURN r_es;
end function1;
并将其添加到vpd策略中。
但是当我运行任何命令时,出现以下错误:
ORA-28113: policy predicate has error
28113. 00000 - "policy predicate has error"
*Cause: Policy function generates invalid predicate.
*Action: Review the trace file for detailed error information.
Error at Line: 1 Column: 18