A bozo's blog
select pg_get_functiondef(pg_proc.oid) from pg_proc, pg_namespace where proname = 'add_cdr_req' and pg_namespace.oid = pg_proc.pronamespace and pg_namespace.nspname = 'crm_db';