Trivadis / plsql-cop-cli

db* CODECOP Command Line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not report G-8210 violations for views owned by SYS

PhilippSalvisberg opened this issue · comments

The following code throws a violation of G-8210:

begin
   <<demo>>
   for r in (
      select synonym_name, table_owner, table_name
        from sys.user_synonyms -- G-8210 should not be thrown in this case
   )
   loop
      sys.dbms_output.put_line(r.synonym_name); -- prefixed according G-7510
   end loop demo;
end;
/

Even if sys objects are not mentioned in G-8210 it would make sense to allow the prefix for views and tables owned by SYS for example to ensure that the original object is used.