DESCRIBE PRIVACY POLICY¶
描述 隐私策略 的属性。
DESCRIBE 可以缩写为 DESC。
语法¶
{ DESC | DESCRIBE } PRIVACY POLICY <name>
参数¶
name指定要描述的隐私策略的标识符。
如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
有关更多信息,请参阅 标识符要求。
输出¶
命令输出在以下列中提供隐私策略属性和元数据:
列
描述
name隐私策略的名称。
signature隐私策略的签名。所有隐私策略均具有相同的签名,不接受任何实参。
return_type返回隐私策略的类型。所有隐私策略返回 PRIVACY_BUDGET,这是一种内部数据类型。
bodySQL 表达式,用于确定隐私策略是否返回隐私预算,如果返回,返回的是哪个预算。
访问控制要求¶
用于执行此 SQL 命令的 角色 必须至少具有以下 一项 权限:
权限 |
对象 |
备注 |
|---|---|---|
APPLY PRIVACY POLICY |
账户 |
|
APPLY |
隐私策略 |
|
OWNERSHIP |
隐私策略 |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on that schema.
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is
type, then specify"type"for the identifier.
示例¶
以下示例描述了名为 myprivpolicy 的隐私策略:
DESCRIBE PRIVACY POLICY myprivpolicy;
+--------------------+---------------+--------------------+-----------------------------------------------+
| name | signature | return_type | body |
+--------------------+---------------+--------------------+-----------------------------------------------+
| MYPRIVPOLICY | () | PRIVACY_BUDGET | PRIVACY_BUDGET(BUDGET_NAME=>'new_budget') |
+--------------------+---------------+--------------------+-----------------------------------------------+