postgresql触发器权限

To create or replace a trigger on a table, the user must have the TRIGGER privilege on the table. The user must also have EXECUTE privilege on the trigger function.

要在表上创建或者替换一个触发器,用户必需在该表上有TRIGGER权限。 用户也必须在触发器函数上有EXECUTE权限

查看某用户的表权限
select * from information_schema.table_privileges where grantee='username';

查看某用户的usage权限
select * from information_schema.usage_privileges where grantee='username';

查看某用户在存储过程函数的执行权限
select * from information_schema.routine_privileges where grantee='username';

查看某用户在某表的列上的权限  (比表权限 更细化)
select * from information_schema.column_privileges where grantee='username'; 

查看当前用户能够访问的数据类型
select * from information_schema.data_type_privileges ; 

CREATE FUNCTION defines a new function. CREATE OR REPLACE FUNCTION will either create a new function, or replace an existing definition. To be able to define a function, the user must have the USAGE privilege on the language.
CREATE FUNCTION定义一个新函数。 CREATE OR REPLACE FUNCTION 创建一个新函数 或者 替换已经存在的定义。
为了能够定义一个函数, 用户必须有 创建函数所使用的语言的 USAGE 权限。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注