Toad World® Forums

Why does these piece of code show a rule 2141 violation ? (Version 13.0.0.80)


#1

CREATE OR REPLACE PACKAGE c##dbss.dbss_util
AUTHID CURRENT_USER
ISFUNCTION get_v$database

RETURN c##dbss.dbss_type.v$database_rt;

PROCEDURE sqls_cursor_2_table (

p_sqls_cv_in IN c##dbss.dbss_type.sqls_cur,
p_sqls_ntv_in_out IN OUT c##dbss.dbss_type.sqls_nt);

PROCEDURE sqls_exec (p_sqls_cv_in IN c##dbss.dbss_type.sqls_nt);

PROCEDURE sqls_show (p_sqls_cv_in IN c##dbss.dbss_type.sqls_nt);
END dbss_util;
/


#2

Hello Walter,

This new rule has a few issues indeed.

First, only the objects should be checked, not the schemas. So in

CREATE OR REPLACE PACKAGE c##dbss.dbss_util

only the dbss_util should be checked. Currently both schema and object are checked.

Second, when altering the rule then you have to specify both the value (say “dbss_”) and its size (value 5 in this case). The latter should not have to happen. We’ll fix the rule for this.

A last thing is that in the XPath expression the value is written between two XPath comments (:PREFIX:) and (:/PREFIX:) . The intent was Toad to associate parameters to the rule, and let the user modify the default value (value “pre_” in this case) by something else, WITHOUT the need to clone the rule. However, the latter is not yet in place.

I’d be interested to learn if you cloned the rule and if/how you modified it.

Thanks,
Andre