Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is there a way to quickly list all the current user-owned functions in Oracle?

Something along the same lines as this, which lists the current user's tables

select * from user_tables;
share|improve this question
    
nice idea to add the information-schema tag (I keep forgetting about information-schema, shows my oracle background. ) –  Niall Litchfield Nov 21 '11 at 16:53
    
@Niall thanks, I felt weird about adding it, but a rose is still a rose... :) –  Jack Douglas Nov 22 '11 at 11:42

2 Answers 2

up vote 4 down vote accepted

The answer you are probably looking for is

select * from user_objects where object_type = 'FUNCTION';

However this won't return a list of packaged functions. I'm not aware of anyway of returning these other than by querying user_objects for objects of type 'PACKAGE' and then describing each in turn. Someone with a developer hat on might be able to answer the packaged function part of the question.

share|improve this answer
    
Great! This is what I was looking for. –  Clarkey Nov 21 '11 at 13:20
    
Look in user_source –  Gaius Dec 5 '11 at 20:21
    
Hi Gaius, wouldn't you have to parse user_source for the text inside the package bodies. that sounds pretty horrible to me. –  Niall Litchfield Dec 8 '11 at 10:13

You can list any user owned objects by querying the user_objects table.

To do this for functions:

select object_name from user_objects where object_type = 'FUNCTION';

This table can also show other objects, like procedures and packages.

The user_objects table is supplemented by the table all_objects, which contains all the objects the current user has access to (i.e. grants to tables in other schemas etc).

The object_types this can be queried for on both tables is as follows:

select distinct object_type from all_objects;

OBJECT_TYPE
-------------------
JOB CLASS
INDEXTYPE
PROCEDURE
JAVA CLASS
SCHEDULE
WINDOW
WINDOW GROUP
JAVA RESOURCE
TABLE
TYPE
VIEW
FUNCTION
PROGRAM
SYNONYM
CONSUMER GROUP
EVALUATION CONTEXT
OPERATOR
PACKAGE
SEQUENCE
XML SCHEMA
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.