September 14th, 2012, 03:16 PM
Inline pragma before cursor
I have a stored proc that calls a user-defined function "fun" like this (greatly simplified):
I want to call fun with "pragma inline(fun, 'YES')".
procedure foo(p_cursor out ref cursor)
open p_cursor for
where fun(a.b) = 1
According to the Oracle documentation, the inline pragma will affect only the following statements if placed right before them:
So, in my case, where should I put the pragma? I do have a call, but it's wrapped in the SQL within a cursor definition.
Assignment CASE EXIT-WHEN
Call CONTINUE-WHEN LOOP
Conditional EXECUTE IMMEDIATE RETURN
What is the right way (if this is feasible at all)?
September 16th, 2012, 10:23 PM
September 17th, 2012, 10:35 AM
Originally Posted by spacebar208
Thank you for the answer and the links. What I was trying to figure out is whether the inline pragma should be placed within the procedure just before the SQL with the function call, or before calling the procedure itself. I'll keep digging.