Before writing a CREATE ROLE statement:
- Read
references/parameters.mdto review all available parameters and their defaults. - For each parameter, decide whether the user's request implies a non-default value.
- Include only the parameters that differ from the default or that the user explicitly requested.
- Never use
CREATE OR REPLACE— always useCREATE ROLE IF NOT EXISTS. - Always add a COMMENT that describes the role's purpose and intended privilege scope. After creating a role, remind the user that the role must be explicitly granted to users or other roles before it is usable, and that the role itself must also be granted the USAGE privilege on any objects it needs to access.