Postgres grant create db permission

Snippet

Let a user create a db.

kitt=# \du 
                                    List of roles
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 kitt        | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
 burble_dev  |                                                            | {}

kitt=# alter user burble_dev createdb;
ALTER ROLE
kitt=# \du 
                                    List of roles
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 kitt        | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
 burble_dev  | Create DB                                                  | {}
ALTER USER username CREATEDB;

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.