2017年4月18日 星期二

取得使用者自訂Function

Refer:

http://stackoverflow.com/questions/16632117/get-all-procedural-user-defined-functions


PostgreSQL 取得自訂的Functions, procedures
select 
    pp.proname,
    pl.lanname,
    pn.nspname,
    pg_get_functiondef(pp.oid)
from pg_proc pp
inner join pg_namespace pn on (pp.pronamespace = pn.oid)
inner join pg_language pl on (pp.prolang = pl.oid)
where pl.lanname NOT IN ('c','internal') 
  and pn.nspname NOT LIKE 'pg_%'
  and pn.nspname <> 'information_schema';

沒有留言: