列出所有自定义的function和view

List Views 【列出所有自定义的function和view】在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
SELECTp.proname, p.prosrc FROMpg_catalog.pg_namespace n JOINpg_catalog.pg_proc p ONp.pronamespace = n.oid WHEREn.nspname = 'public';

source

    推荐阅读