¿Existe alguna manera de ver
el código que ejecuta una función de ORACLE?
Existe un objeto
que se llama ALL_SOURCE donde se almacena el codigo
de
los STORED PROCEDURES ...
SQL> desc all_source
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER VARCHAR2(30)
NAME VARCHAR2(30)
TYPE VARCHAR2(12)
LINE NUMBER
TEXT VARCHAR2(4000)
SQL> create or replace function f
return number is
2 n number(2);
3 begin
4 n:=to_char(sysdate,'dd');
5 return n;
6 end;
SQL> /
Function created.
SQL> select text from all_source where
name = 'F';
TEXT
--------------------------------------------------------------------------
function f return number is
n number(2);
begin
n:=to_char(sysdate,'dd');
return n;
end;