PostgreSQL users

From gnewarchaeology wiki
Jump to: navigation, search
PostgreSQL > PostgreSQL users



Create a role

PostgreSQL manages database access permissions using the concept of roles. A database role can have a number of attributes that define its privileges and interact with the client authentication system: login privilege, password, database creation, role creation.

CREATE ROLE ciccio LOGIN PASSWORD 'passwd' CREATEDB CREATEROLE;

Alter a role

ALTER ROLE changes the attributes of a PostgreSQL role, but cannot change a role's memberships. Use GRANT and REVOKE to do that.

ALTER ROLE ciccio SUPERUSER;

Role memberships

  • []
  • []

Drop a role