解决方法
在其正文中包含文本“thetable”的函数.
select * from ( select proname,row_number() over (partition by proname) as line,textline from ( select proname,unnest(string_to_array(prosrc,chr(10))) textline from pg_proc p join pg_namespace n on n.oid = p.pronamespace where nspname = 'public' and prosrc ilike '%thetable%' ) lines ) x where textline ilike '%thetable%';
具有与表相关联的任何参数或返回值的函数.
例如:
create function f2(rec thetable)... create function f1() returns setof thetable...
with rtype as ( select reltype from pg_class where relname = 'thetable') select distinct on (proname) proname,prorettype,proargtypes from pg_proc p join pg_namespace n on n.oid = p.pronamespace cross join rtype where nspname = 'public' and ( prorettype = reltype or reltype::text = any(string_to_array(proargtypes::text,' ')))
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。