I have a user with read-only access in my PostgreSQL 11.
How can I give them access to write/edit data in some of the database tables, e.g. Table1
and Table2
only?
I don't want them to change the DB schema or table structure.
CodePudding user response:
Use GRANT
:
GRANT INSERT, UPDATE, DELETE ON table1 TO some_user;
You may want to read about basics of the Postgres privilege system in the manual. One essential quote:
The right to modify or destroy an object is inherent in being the object's owner, and cannot be granted or revoked in itself. (However, like all privileges, that right can be inherited by members of the owning role; see Section 22.3.)