"PLS_INTEGER" types should be used (plsql:S4081)

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

Thank you for opening this issue, @LarsSt .
Your feedback helps us improve our products.

After looking into it, I can confirm that this should be considered a False Positive, meaning we should not be raising.

I added an issue in our PL/SQL dedicated backlog.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.