列出引用PostgreSQL中的表的存储函数 [英] List stored functions that reference a table in PostgreSQL

查看:98
本文介绍了列出引用PostgreSQL中的表的存储函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单快速的问题:在PostgreSQL中,如果可能的话,如何仅使用SELECT语句使用表列出所有存储函数/存储过程的名称?如果简单的SELECT不足,我可以使用存储的函数.

Just a quick and simple question: in PostgreSQL, how do you list the names of all stored functions/stored procedures using a table using just a SELECT statement, if possible? If a simple SELECT is insufficient, I can make do with a stored function.

我认为我的问题与另一个问题类似,但是另一个问题是针对SQL Server 2005的:
表中的存储过程列表

My question, I think, is somewhat similar to this other question, but this other question is for SQL Server 2005:
List of Stored Procedure from Table

(可选)为此,您还如何列出以相同方式使用同一表的触发器和约束?

(optional) For that matter, how do you also list the triggers and constraints that use the same table in the same manner?

推荐答案

SELECT  p.proname
FROM    pg_catalog.pg_namespace n
JOIN    pg_catalog.pg_proc p
ON      p.pronamespace = n.oid
WHERE   n.nspname = 'public';

这篇关于列出引用PostgreSQL中的表的存储函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆