PostgreSQL: Script to List Functions

PostgreSQL: Script to List Functions

novicetechie

You can list all user-defined and system functions in PostgreSQL using system catalogs.

List Functions in Current Database


SELECT routine_name
FROM information_schema.routines
WHERE routine_type = 'FUNCTION'
AND routine_schema = 'public';

List Functions with Definition


SELECT proname, pg_get_functiondef(p.oid)
FROM pg_proc p
JOIN pg_namespace n ON n.oid = p.pronamespace
WHERE n.nspname = 'public';

This is helpful when auditing or documenting database logic.

Comments

Simple Tech Tips for Everyday Users

Learn easy tech solutions, beginner-friendly tutorials, and simple fixes for your phone, laptop, apps, and internet problems — all in one place.

Explore by Category

About NoviceTechie

NoviceTechie.com is your simple tech helper. We provide beginner-friendly tutorials, how-to guides, and easy troubleshooting tips to make technology easier for everyone — no technical knowledge required.

Latest Posts

Get Simple Tech Tips Weekly

Join our free updates (optional).

Follow Us
NoviceTechie.com — Simple tech tutorials, everyday problem fixes, and easy guides for beginners.