You may benefit running this by the PL/SQL group for more details, but with cursor sharing set to similar, literal replacement kicks
in. Queries with binds and table functions and select * in the topmost query block cannot avoid the usage of the CAST..AS construct.
From bug 1702058 (unpublished unfortunately):
"Essentially, the number of items on the the select list is not available till the end of semantic analysis. If semantic analysis is deferred, then this information isn't available till the first phase of typecheck.
In the absence of any information as to the size of the select list, we will have to perform to grow/shrink the size of the define list. We will also have to defer any error raising (number of defines does not match number of select list items) till the semantic analysis phase is complete."
So you get this errror. Setting cursor_sharing=exact seems to get around this although the workaround in the bug is to use CAST. Something like
select *
from table(cast(dbms_xplan.display('plan_table')
as dbms_xplan_type_table));
The PL/SQL group will be better able to help advise on how to use the CAST functionality with your query
Partager