RefLib

Reference library for AI

Back

postgresql_16:7.1.76.5 Compatibility

PostgreSQL 16 > Reference > SQL Commands > CREATE ROLE > Compatibility

The CREATE ROLE statement is in the SQL standard, but the standard only requires the syntax CREATE ROLE *name* [ WITH ADMIN *role_name* ] Multiple initial administrators, and all the other options of CREATE ROLE, are PostgreSQL extensions.

The SQL standard defines the concepts of users and roles, but it regards them as distinct concepts and leaves all commands defining users to be specified by each database implementation. In PostgreSQL we have chosen to unify users and roles into a single kind of entity. Roles therefore have many more optional attributes than they do in the standard.

The behavior specified by the SQL standard is most closely approximated creating SQL-standard users as PostgreSQL roles with the NOINHERIT option, and SQL-standard roles as PostgreSQL roles with the INHERIT option.

Back