This content has been marked as final. Show 4 replies
Welcome to the forum!
Non-standard column names (all non-standard identifiers, actually) must be enclosed in double-quotes. Starting with a digit, as well as containing a slash, make "2010/01" a non-standard identifier. Don't you have to use double-quotes around the column name in lots of other places?
By the way, creating your own objects (such as the restr_view function) in the SYS schema can cause problems. Why can't you create it in the fpcs schema? Failing that, you might create a schema just for your own SYS-like objects. I have a schema with lots of special privileges that I use for things that I might be tempted to put in SYS or SYSTEM.
BEGIN DBMS_RLS.ADD_POLICY ( OBJECT_SCHEMA => 'FPCS', OBJECT_NAME => 'FORECAST', POLICY_NAME => 'RESTRICT_VIEW', FUNCTION_SCHEMA => 'SYS', POLICY_FUNCTION => 'RESTR_VIEW', SEC_RELEVANT_COLS =>'"2010/01"', SEC_RELEVANT_COLS_OPT => DBMS_RLS.ALL_ROWS ); END; /
One advantage is that it makes life simpler when I create a new database. I can simply import that whole schema, the same way I import other schemas.