felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
213 stars 78 forks source link

False positive in SelectAllColumnsCheck when using BULK COLLECT #109

Closed felipebz closed 5 years ago

felipebz commented 5 years ago

Example:

declare
  type emp_data is table of emp%rowtype;
  emps emp_data;
begin  
  select *
    bulk collect into emps -- causes a "SELECT * should not be used."
    from emp;

But in this case using SELECT * is the safer option, it shouldn't generate an issue.

Due to a limitation of the type solver (#108), the easiest fix is just ignore BULK COLLECT in this check for now.