GET ROLE DATABASE DDL

The GET_ROLE_DATABASE_DDL statement returns the definition of a role’s database in DDL format.

Syntax

SELECT GET_ROLE_DATABASE_DDL(<'role_name'>)

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 ;

Example

The following is an example of using the GET_ROLE_DATABASE_DDL statement:

SELECT GET_ROLE_DATABASE_DDL('public');

Permissions

Using the GET_ROLE_DATABASE_DDL statement requires no special permissions.

For more information, see the following: