Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.77 KB

roles.md

File metadata and controls

58 lines (38 loc) · 1.77 KB

Role Operations

pgm.createRole( role_name, role_options )

Create a new role - postgres docs

Arguments:

  • role_name [Name] - name of the new role
  • role_options [object] - options:
    • superuser [boolean] - default false
    • createdb [boolean] - default false
    • createrole [boolean] - default false
    • inherit [boolean] - default true
    • login [boolean] - default false
    • replication [boolean] - default false
    • bypassrls [boolean]
    • limit [number] -
    • password [string] -
    • encrypted [boolean] - default true
    • valid [string] - timestamp
    • inRole [string or array of strings] - role or array of roles
    • role [string or array of strings] - role or array of roles
    • admin [string or array of strings] - role or array of roles

Reverse Operation: dropRole


pgm.dropRole( role_name )

Drop a role - postgres docs

Arguments:

  • role_name [Name] - name of the new role

pgm.alterRole( role_name, role_options )

Alter a role - postgres docs

Arguments:

  • role_name [Name] - name of the new role
  • role_options [object] - see

pgm.renameRole( old_role_name, new_role_name )

Rename a role - postgres docs

Arguments:

  • old_role_name [Name] - old name of the role
  • new_role_name [Name] - new name of the role