Question

I have a PostgreSQL database with 37 schemas and > 500 functions. I'm trying to locate a specific function but am not seeing it when I manually browse the database tree in pgAdmin.

Is there a command in PostgreSQL to locate the schema that a specific function is in?

Thanks.

Was it helpful?

Solution

You can use information_schema.routines to do this:

SELECT specific_schema,  specific_catalog, routine_schema, routine_catalog 
FROM  information_schema.routines
WHERE routine_name = 'X' AND routine_type = 'FUNCTION';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top