GET_ROLE_DATABASE_DDL

The GET_ROLE_DATABASE_DDL statement returns the definition of a global role in DDL format.

The GET_ROLE_DATABASE_DDL page describes the following:

Syntax

The following is the correct syntax for using the GET_ROLE_DATABASE_DDL statement:

select get_role_database_ddl(<'role_name'>)

Example

The following is an example of using the GET_ROLE_GLOBAL_DDL statement:

select get_role_global_ddl('public');

Parameters

The following table shows the GET_ROLE_DATABASE_DDL parameters:

Parameter

Description

role_name

The definition of the database role in DDL format.

Output

The following is an example of the output of the GET_ROLE_DATABASE_DDL statement:

grant create, usage on schema "public" to "public" ; alter default schema for "public" to "public"; alter default permissions for "public" for schemas grant superuser to creator_role ; alter default permissions for "public" for tables grant select, insert, delete, ddl to creator_role ;

Permissions

Using the GET_ROLE_DATABASE_DDL statement requires no special permissions.

For more information, see the following: