Granting User Rights
The four basic rights in the PostgreSQL database system are select (read), insert (write), update/delete (write), and rule (write/execute). By default, the creator of a database is given all rights to all objects in the database. These privileges are considered immutable for the DBA superuser account.
To assign other users rights on database options, use the GRANT and REVOKE SQL commands, as shown in the following:
psql=>GRANT SELECT, UPDATE ON authors TO bill; psql=>REVOKE ALL ON payroll FROM joe;
Specifying permissions on a user-by-user basis can become tedious on systems with a sizable number of user accounts. Using GRANT and REVOKE in combination with groups can be an effective method for handling rights management.