列出所有自定义的function和view

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;

Source

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';

source

你可能感兴趣的:(列出所有自定义的function和view)