SHOW PACKAGES POLICIES¶

Lists packages policy information.

Syntax¶

SHOW PACKAGES POLICIES [ IN
                            {
                              SCHEMA                   |
                              SCHEMA <schema_name>     |
                              <schema_name>
                            }
                       ]
Copy

Parameters¶

[ IN ... ]

Optionally specifies the scope of the command. Specify one of the following:

SCHEMA, . SCHEMA schema_name, . schema_name

Returns records for the current schema in use or a specified schema (schema_name).

SCHEMA is optional if a database is in use or if you specify the fully qualified schema_name (for example, db.schema).

If no database is in use, specifying SCHEMA has no effect on the output.

Output¶

The command output provides policy properties and metadata in the following columns:

Column

Description

created_on

Date and time when the policy was created.

name

Name of the policy.

database_name

Database in which the policy is stored.

schema_name

Schema in which the policy is stored.

kind

The kind of policy.

owner

Role that owns the policy (i.e. has the OWNERSHIP privilege on the policy)

comment

Comment for the policy.

owner_role_type

The type of role that owns the object, for example ROLE. . If a Snowflake Native App owns the object, the value is APPLICATION. . Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.

Access control requirements¶

A role used to execute this SQL command must have at least one of the following privileges at a minimum:

Privilege

Object

Notes

OWNERSHIP

Packages policy

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).

USAGE

Packages policy

Also grants the ability to execute a SHOW or DESCRIBE command on the packages policy. Can be granted to a role using the GRANT <privileges> command.

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes¶

  • The command does not require a running warehouse to execute.

  • The value for LIMIT rows cannot exceed 10000. If LIMIT rows is omitted, the command results in an error if the result set is larger than 10K rows.

    To view results for which more than 10K records exist, either include LIMIT rows or query the corresponding view in the Snowflake Information Schema.

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Example¶

SHOW PACKAGES POLICIES;
Copy