Click to See Complete Forum and Search --> : Package Question


orauser
04-02-2001, 01:43 PM
I have a package (PKG_Validation) with two procedures (usp_test1 and usp_test2) and one function (uf_loc).

Is there a system table/view that I can query that will show all the procedures/functions within a package?


Thank you in advance.

Oracledba8
04-02-2001, 03:28 PM
Just Issue

Desc PKG_Validation

It will show the Procedure/ Function name and the Parameters along with Mode.

Hope this is what you want.

Thanks

orauser
04-02-2001, 03:43 PM
Actually , I am looking for a query that will give me back list of procs/function names that are defined in the package.


Thank you.

akkerend
04-02-2001, 04:38 PM
With this query you get the parameters of procedures and functions in the package:
SELECT * FROM user_arguments
WHERE package_name = 'PKG_VALIDATION' ;


With this query you get procedures and functions in the package:
SELECT object_name,
decode(min(position),0,'FUNCTION',1,'PROCEDURE',null) TYPE
FROM user_arguments
WHERE package_name = 'PKG_VALIDATION'
GROUP BY object_name;

orauser
04-03-2001, 09:51 AM
Thank you very much. It works like a charm.

YOU ARE THE MAN/WOMAN :-)

kmesser
04-03-2001, 11:50 AM
What if you also wish to see those procedures which take no parameters?

jmodic
04-03-2001, 03:27 PM
Originally posted by kmesser
What if you also wish to see those procedures which take no parameters?
From the same view: USER/ALL/DBA_ARGUMENTS. Packaged procedures and functions are listed there regardles of their parameters.

akkerend
04-03-2001, 04:08 PM
For procedures and functions (in packages) without parameters, the column argument_name is null. For procedures column data_type is null, for functions data_type is datatype of return type.