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
211 stars 77 forks source link

False-positive "Specify the columns in this INSERT." when using ROWTYPE #176

Closed rstribrn closed 9 months ago

rstribrn commented 9 months ago

False-positive "Specify the columns in this INSERT." when using ROWTYPE:

p_row IN mytable%ROWTYPE

INSERT INTO mytable VALUES p_row RETURNING ID INTO p_id;

Maybe parsing should detect "missing brackets" behind VALUES, and consider it a rowtype variable (search for it)????

felipebz commented 9 months ago

Hi,

Thanks for reporting this issue. Actually the rule already checks for ROWTYPE variables, but in this case it was checking the wrong variable ("p_id" from the RETURNING INTO clase, instead of "p_row" from the VALUES clause).

rstribrn commented 9 months ago

Thank you! That was really fast.