May 2019
Intermediate to advanced
600 pages
20h 46m
English
The superuser role has some privileges that can also be granted to non-superuser roles separately.
To give the bob role the ability to create new databases, run this:
ALTER ROLE BOB WITH CREATEDB;
To give the bob role the ability to create new users, run the following:
ALTER ROLE BOB WITH CREATEROLE;
It is also possible to give ordinary users more fine-grained and controlled access to an action reserved for superusers using security definer functions. The same trick can also be used to pass partial privileges between different users.
Read now
Unlock full access