List Views
在pg_views中保存了View的信息,包括schemaname, viewname, viewowner and definition.
select * from pg_catalog.pg_views
where schemaname not in ('pg_catalog', 'information_schema')
order by schemaname, viewname;
List Functions
SELECT p.proname, p.prosrc
FROM pg_catalog.pg_namespace n
JOIN pg_catalog.pg_proc p
ON p.pronamespace = n.oid
WHERE n.nspname = 'public';