SELECT n.nspname AS schema_name
,p.proname AS function_name
,pg_get_functiondef(p.oid) AS func_def
,pg_get_function_arguments(p.oid) AS args
,pg_get_function_result(p.oid) AS result
FROM pg_proc p
JOIN pg_namespace n ON n.oid = p.pronamespace
WHERE p.proname ILIKE 'func_name%';
Extract function DDL in Postgres.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.