Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CREATE ROLE

CREATE ROLE name
  [ PASSWORD 'password' ]
  [ LOGIN | NOLOGIN ]
  [ SUPERUSER | NOSUPERUSER ]
  [ CREATEDB | NOCREATEDB ]
  [ CREATEROLE | NOCREATEROLE ]
  [ INHERIT | NOINHERIT ]
  [ VALID UNTIL 'timestamp' ];

Creates a persisted authorization role. Defaults are NOLOGIN, NOSUPERUSER, NOCREATEDB, NOCREATEROLE, and INHERIT. VALID UNTIL limits authentication; infinity removes the limit.