Open rvo-cs opened 1 year ago
Thanks for reporting this issue.
It's clearly a bug since
set pagesize 1000
set linesize 1000
column name format a30
column text format a70
select line, col, name, type, text
from plscope_identifiers
where procedure_name = 'SAVE_OBJECT_CACHE'
and type = 'TABLE'
order by line, col;
produces
LINE COL NAME TYPE TEXT
---------- ---------- ------------------------------ ------------------ ----------------------------------------------------------------------
372 19 UT_SUITE_CACHE TABLE delete from ut_suite_cache t
376 19 UT_SUITE_CACHE_PACKAGE TABLE delete from ut_suite_cache_package t
384 14 UT_SUITE_CACHE_PACKAGE TABLE from ut_suite_cache_package t
390 35 UT_SUITE_CACHE_SCHEMA TABLE update /*+ no_parallel */ ut_suite_cache_schema t
395 42 UT_SUITE_CACHE_SCHEMA TABLE insert /*+ no_parallel */ into ut_suite_cache_schema
400 36 UT_SUITE_CACHE_PACKAGE TABLE update /*+ no_parallel */ ut_suite_cache_package t
406 42 UT_SUITE_CACHE_PACKAGE TABLE insert /*+ no_parallel */ into ut_suite_cache_package
411 21 UT_SUITE_CACHE TABLE delete from ut_suite_cache t
415 40 UT_SUITE_CACHE TABLE insert /*+ no_parallel */ into ut_suite_cache t
441 40 UT_SUITE_CACHE TABLE insert /*+ no_parallel */ into ut_suite_cache t
10 rows selected.
There are different line numbers, since the version of utPLSQL is most probably different. But it's important, that UT_SUITE_CACHE
is part of the result in this view. Hence it should be also part of plscope_tab_usage
.
Example:
Using utPLSQL, release 3.1.12, installed in the UT3 schema.
Results:
Expected;
UT_SUITE_CACHE is an object table, and as such, is not listed in DBA_TABLES [^object_tables_in_dict].
For that reason, as of v1.0.0, it is ignored by plscope_tab_usage, which only takes into account tables from DBA_TABLES.
[^object_tables_in_dict]: Object tables are treated specially in the data dictionary: they appear in DBA_OBJECTS with object_type = 'TABLE', but they are not listed in DBA_TABLES. Instead, they are found in the DBA_OBJECT_TABLES and DBA_ALL_TABLES views. Further, their "columns" are listed in DBA_TAB_COLUMNS, yet PL/Scope records references to these columns as "object attribute references", not as "column references" as it would for columns of ordinary tables.