查询视图
SELECT schemaname,viewname AS view_name, definition AS view_definition
FROM pg_views
WHERE schemaname = 'dcf_user';
查询存储过程
SELECT a.proname ,a.prosrc ,b.rolname
FROM pg_proc a
left join pg_roles b on a.proowner =b.oid
where b.rolname = 'dcf_user';