October 2001
Beginner to intermediate
400 pages
7h 45m
English
There are four basic rights in the PostgreSQL database system:
Select (read)
Insert (write)
Update/Delete (write)
Rule (write/execute)
By default, the creator of a database is implicitly 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, such as:
GRANT SELECT, UPDATE ON authors TO bill; REVOKE ALL ON payroll FROM joe;
The PostgreSQL system also has a reserved keyword called PUBLIC that applies to every user in the system (except the DBA). This can make setting blanket rules and permissions much easier.
GRANT SELECT, UPDATE ON authors TO PUBLIC; REVOKE UPDATE, DELETE ...
Read now
Unlock full access