Showing posts with label databaseroles. Show all posts
Showing posts with label databaseroles. Show all posts

Sunday, 29 November 2026

Roles in Postgres

CREATE ROLE defines a new database role in Postgres. Its syntax is:

CREATE ROLE name  [ [WITH]  option  [..] ]

This creates a new role to a PostgreSQL database cluster. 

A role is an entity that can own database objects and have database privileges; a role can be considered a "user" or a "group" depending on how it is used.

Roles can grant permissions to other roles.

The following sections of the PostgreSQL manual should be read in conjunction with CREATE ROLE documentation.