Language: PL/SQL
Rule: “PLS_INTEGER” types should be used (plsql:S4081)
SonarQube: 9.4
The issue will be raised for object type attributes with a number type. For example:
CREATE OR REPLACE TYPE MY_TYPE FORCE AS OBJECT
(
A_NUMBER NUMBER(4)
);
Unfortunately object types don’t support the PLS_INTEGER type. If I compile this:
CREATE OR REPLACE TYPE MY_TYPE FORCE AS OBJECT
(
A_NUMBER PLS_INTEGER
);
I get this error:
Type MY_TYPE compiled
LINE/COL ERROR
--------- -------------------------------------------------------------
3/13 PLS-00530: Illegal type used for object type attribute: 'PLS_INTEGER'.
Errors: check compiler log